home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ETO Development Tools 4
/
ETO Development Tools 4.iso
/
Essentials
/
MacApp Documentation
/
Class&Method Reference (411)
/
MacApp411Help
next >
Wrap
Text File
|
1990-07-24
|
1MB
|
38,022 lines
æKY CopyrightNotice
æC Copyright Apple Computer, Inc. 1989-1990, All rights reserved.
411- MacApp Help - 2.0 Release.
æKY Classes
æKL
TAboutAppCommand
TApplication
TAssociation
TButton
TCellSelectCommand
TCheckBox
TClassesByID
TClassesByName
TClassListView
TCloseWindowCommand
TCluster
TColumnSelectCommand
TCommand
TCommandList
TControl
TControlTracker
TCtlMgr
TDebugApplication
TDebugCommand
TDeskScrapView
TDialogTEView
TDialogView
TDocument
TDynamicArray
TEditText
TEntriesList
TEntry
TEvtHandler
TGridView
TIcon
TInspector
TInspectorCommand
TInspectWindow
TList
TListView
TNewDocCommand
TNoChangesCommand
TNumberText
TObject
TObjectList
TObjectView
TObjListView
TOldDocCommand
TPattern
TPicture
TPopup
TPrintCommand
TPrintHandler
TPrintStyleChangeCommand
TPtrBasedDoublyLinkedList
TQuitCommand
TRadio
TRCSelectCommand
TRevertDocCommand
TRowSelectCommand
TRunArray
TSaveDocCommand
TScrollBar
TScroller
TSortedList
TSScrollBar
TStaticText
TStdPrintHandler
TTECommand
TTECutCopyCommand
TTEPasteCommand
TTEStyleCommand
TTETypingCommand
TTEView
TTextGridView
TTextListView
TTranscriptView
TUndoRedoCommand
TView
TWindow
æKY TAboutAppCommand
æHY TAboutAppCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC The sole purpose of TAboutAppCommand, a specialized subclass of
TNoChangesCommand, is to display an applicaion's About box.
æKY TApplication
æHY TApplication—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TApplication is the abstract class from which your application inherits its
ability to perform application-like tasks. Its primary function is to provide the
main event loop from which the application calls all the particular functions
available to the user. Each application consists of one, and only one, instance
of TApplication, along with whatever auxiliary objects might be required to
implement the application's function. The TApplication object contains the methods
necessary for the functions that affect the application as a whole, such as
opening a file, creating a new file, dismissing the application, or displaying the
About box.
æKY TAssociation
æHY TAssociation—>TObject
æFi UAssociation.p
æT CLASS
æC TAssociation manages a list of TEntry objects. TAssociation objects act as
tables of keys maintained in key order and associated with values (the keys and
values are stringhandles); MacApp uses TAssociation objects to implement
parameterized text in dialog boxes.
æKY TButton
æHY TButton—>TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a Control Manager button.
æKY TCellSelectCommand
æHY TCellSelectCommand—>TCommand—>TObject
æFi UGridView.p
æT CLASS
æC The TCellSelectCommand class defines methods for selecting cells in views
implemented by TGridView and its subclasses, TTextGridView and TTextListView.
TCellSelectCommand also has methods for initializing and freeing command objects,
highlighting a selection, and providing the user with onscreen feedback.
æKY TCheckBox
æHY TCheckBox—>TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a Control Manager check box control.
æKY TClassesByID
æHY TClassesByID—>TSortedList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TClassesByID objects maintain lists of MacApp classes sorted by their ID
numbers. MacApp uses these lists to keep track of objects in the Inspector; you
usually do not need to create instances of TClassesByID yourself, nor do you need to
access instances of this class that are created by MacApp. The methods of this
class are internal to the MacApp Inspector; you cannot call them yourself or
override them.
æKY TClassesByName
æHY TClassesByName—>TSortedList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TClassesByName objects maintain lists of MacApp classes sorted by the class
names. MacApp uses these lists to keep track of objects in the Inspector; you
usually do not need to create instances of TClassesByID yourself, nor do you need
to access instances of this class that are created by MacApp. The methods of
this class are internal to the MacApp Inspector; you cannot call them yourself or
override them.
æKY TClassListView
æHY TClassListView—>TListView—>TView—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TClassListView implements a view of a list of classes in the MacApp Inspector.
If you wish to do something similar, you will probably find it easier to
implement using a TTextListView object. The TTextListView class has list-management
methods that are not present in the TClassListView class. You usually do not need
to create instances of TClassListView yourself, nor do you need to access
instances of this class that are created by MacApp. The methods of this class are
internal to the MacApp Inspector; you cannot call them yourself or override
them.
æKY TCloseWindowCommand
æHY TCloseWindowCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TCloseWindowCommand is a specialized subclass of TNoChangesCommand whose sole
purpose is to close windows by calling gApplication.CloseByUser for the frontmost
window.
æKY TCluster
æHY TCluster—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC TCluster implements a view that can be used to contain controls, such as groups
of radio buttons. TCluster is usually used to localize the handling of
logically grouped controls; the default version of this class provides methods that can
receive an mRadioHit message from a subview, select the chosen control, and
deselect the others. TCluster can also be used to provide labeled adornments
around controls and other groups of dialog items.
æKY TColumnSelectCommand
æHY TColumnSelectCommand—>TRCSelectCommand—>TCellSelectCommand—>TCommand—>TObject
æFi UGridView.p
æT CLASS
æC TColumnSelectCommand is a subclass of TCellSelectCommand, and has methods for
selecting a column of cells in a TGridView view.
æKY TCommand
æHY TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC In MacApp, an instance of TCommand is called a "command object," and command
objects that track the mouse are called "mouse trackers." The TCommand class has
methods for initializing command objects and mouse trackers, constraining mouse
movement, implementing user commands that can be undone, and providing onscreen
user feedback. Most of the methods of TCommand are empty; you must override
them with methods that can execute your application's commands. You never create
instances of TCommand directly, and you rarely call TCommand objects yourself;
rather, MacApp sends messages to TCommand instances in response to complex
commands. (In MacApp, a "complex" command is one that changes the document and can
be undone, or one that requires mouse tracking.) However, for many simple
commands—commands that do not change the document or do not track the mouse—you may
never have to create a command object; you can carry out the action of those
commands from the methods DoMenuCommand, DoMouseCommand, DoKeyCommand,
DoCommandKey or from another method that returns a command object. You usually override
the methods DoIt, UndoIt, RedoIt, and possibly Commit for command objects and
trackers that change the document, whereas you override TrackConstrain,
TrackFeedback, and TrackMouse only for mouse trackers. Command objects and mouse
trackers that do not change the document do not need the UndoIt, RedoIt, or Commit
methods. (For further information, see the MacApp 2.0 Cookbook for a number of
recipes using different types of command objects and mouse trackers.)
æKY TCommandList
æHY TCommandList—>TSortedList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFi UMacApp.p
æT CLASS
æC TCommandList provides a mechanism to keep a list of the commands in the command
queue. You usually do not need to create instances of TCommandList yourself,
nor do you need to access instances of this class that are created by MacApp.
æKY TControl
æHY TControl—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TControl is an abstract class, the ancestor of all classes that implement
familiar Macintosh® controls such as scroll bars, radio buttons, and pop-up menus.
TControl controls include non-Control Manager controls (either of your own
creation or as defined in the UDialog unit) and Control Manager controls—that is,
radio buttons, push buttons, check boxes, and scroll bars. (Control Manager
controls are instances of TCtlMgr, a subclass of TControl.) Descendants of TControl
have the following properties: •They are limited to QuickDraw’s coordinate
space. •The can track the mouse without your having to create a command object.
TControl methods can be overridden to implement behavior while tracking the mouse
rather than implementing the behavior in a separate command object. •They can
have combinations of a set of standard adornments, such as a rectangular frame
and a shadow. •They have a text style used to draw the control’s label (if it has
one). •They have insets or margins in which mouse clicks are ignored.
æKY TControlTracker
æHY TControlTracker—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TControlTracker is a specialized subclass of TNoChangesCommand that you can use
to track the mouse in a control. TControlTracker objects always track the
mouse—whether it moves or not—without constraining it to the control's view; this
allows MacApp to automatically highlight a control when the mouse pointer is in
its active area, and remove the highlighting when the mouse pointer strays
outside the control's active area.
æKY TCtlMgr
æHY TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TCtlMgr is an abstract class whose descendants implement the behavior of
standard Macintosh® dialog items, such as radio buttons and check boxes. It is a
subclass of TControl.
æKY TDebugApplication
æHY TDebugApplication—>TApplication—>TEvtHandler—>TObject
æFm UDebug.inc1.p
æT CLASS
æC TDebugApplication provides the behavior used by the MacApp debugger. The methods
of the TDebugApplication class are for internal use by the MacApp debugger
only; you cannot create or access instances of TDebugApplication yourself, nor can
you override or call methods of this class yourself.
æKY TDebugCommand
æHY TDebugCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TDebugCommand is a specialized subclass of TNoChangesCommand that MacApp uses
for entering the Interactive Debugger. TDebugCommand has only two methods: an
IDebugCommand method that initializes the command object responsible for entering
the debugger, and a DoIt method that actually invokes the debugger. The methods
of the TDebugCommand class are for internal use by the MacApp debugger only;
you usually do not need to create instances of TDebugCommand yourself, nor do
you need to directly access instances of this class that are created by MacApp.
æKY TDeskScrapView
æHY TDeskScrapView—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TDeskScrapView provides the basic functionality necessary for displaying the
Macintosh® desk scrap. Normally you will use TDeskScrapView to display 'TEXT' or
'PICT' data in Clipboard windows. You must override the methods of TDeskScrap
view if you wish to support other data formats.
æKY TDialogTEView
æHY TDialogTEView—>TTEView—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class is a subclass of TTEView used by TDialogView to perform editing on
TEditText views. A TDialogTEView object is superimposed over its corresponding
TEditText view; it is in the TDialogTEView that the actual text editing takes
place. When implementing editable text in dialog boxes, it is preferable to use
TDialogTEView objects rather than TTEView objects because the TDialogTEView class
is specialized for this task: TDialogTEView objects are associated with the
edit text and a scroller, resize themselves according to the size of the edit
text and scroller, and have an InstallEditText method that facilitates the
installation of the edit text and scroller. You usually do not need to create
TDialogTEView objects yourself; MacApp does it for you automatically when you create a
dialog box having TEditText objects as subviews.
æKY TDialogView
æHY TDialogView—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC TDialogView acts as the topmost view in a MacApp dialog box, undertaking several
tasks that mimic the functions of the Macintosh Dialog Manager. The methods of
this class duplicate the function of a dialog box without actually using the
Dialog Manager—for instance, the substitution of parameterized text in dialog
boxes.
æKY TDocument
æHY TDocument—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC Instances of TDocument represent the data that an application manipulates; a
particular instance of TDocument is usually associated with a file on a disk.
Typical examples of the use of TDocument include representing the bitmap data used
by a paint application, or the text and formatting data used by a word
processor. TDocument is an abstract class; it is meant to be overridden in order to
implement your application's particular document format. You never create
instances of TDocument directly; instead, the application object creates them as
needed. The methods implemented in TDocument normally include commands that directly
change or affect the data, such as the Save method (which saves the current
state of the data in the associated disk file) or the Revert method (which
restores the working copy of the data to the state that was last saved).
æKY TDynamicArray
æHY TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFi UList.p
æT CLASS
æC TDynamicArray implements dynamic arrays. MacApp 2.0 provides a subclass of this
class called TList to handle a list of dynamic objects; you can use
TDynamicArray directly or create subclasses to construct other kinds of dynamic lists.
æKY TEditText
æHY TEditText—>TStaticText—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a simple editable text item. TEditText is implemented as a
subclass of TStaticText. When the item needs to be edited, the parent
DialogView places a “floating” TEView on top of the view.
æKY TEntriesList
æHY TEntriesList—>TSortedList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFi UAssociation.p
æT CLASS
æC TEntriesList objects provide behavior for maintaining lists of entries in a
TAssociation object. This class is meant for MacApp's internal use; you usually do
not create instances of TEntriesList yourself.
æKY TEntry
æHY TEntry—>TObject
æFi UAssociation.p
æT CLASS
æC This class is used by TAssociation to form a very basic text-item dictionary
mechanism whose main use is the substitution of text in dialog-type window items.
This class is instantiated for each key string and its replacement.
TAssociation tracks the list of these entries by means of a TEntriesList object.
æKY TEvtHandler
æHY TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC The class TEvtHandler is the abstract ancestor of all classes that handle
events. Its subclasses include TApplication, TDocument, TPrintHandler, TView, and all
of their subclasses. In Macintosh programming, the word ‘event’ refers to
mouse clicks, keystrokes, the insertion of disks, the activation of windows, and so
on. TEvtHandler is the ancestor of all classes whose main purpose is to handle
such events.
æKY TGridView
æHY TGridView—>TView—>TEvtHandler—>TObject
æFi UGridView.p
æT CLASS
æC TGridView is a general-purpose abstract class useful for creating views that
display data in a matrix or grid format. A good example is a view that displays a
chessboard or a spreadsheet. A less obvious is the list of files that appears
in a Macintosh Standard File dialog box. This list could be implemented as a
subclass of TGridView whose instances display a vertical, one-dimensional
scrolling grid of text items. The TGridView subclass TTextListView is precisely suited
to this task.
æKY TIcon
æHY TIcon—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements an icon that can serve as a simple form of button if
enabled. As members of a subclass of TControl, TIcon objects always track the mouse
and highlight automatically if the mouse pointer strays within their active
control area. TIcon objects also share the standard properties of other Macintosh
icons: they are resources of type 'ICON' or 'cicn', they are 32 x 32 bits in
size, they can be moved or resized by the application, and they can be edited
using ViewEdit™.
æKY TInspector
æHY TInspector—>TDocument—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TInpsector provides management of MacApp Inspector windows. The methods of this
class are internal to the MacApp Inspector; you cannot call them yourself or
override them.
æKY TInspectorCommand
æHY TInspectorCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TInspectorCommand is a subclass of TNoChangesCommand specialized to create an
Inspector window.
æKY TInspectWindow
æHY TInspectWindow—>TWindow—>TView—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TInspectWindow is a subclass of TWindow specialized to display the fields of the
active objects in an application. The MacApp Inspector uses it to display the
contents of objects’ fields for the programmer’s scrutiny. The methods of this
class are internal to the MacApp Inspector; you cannot call them yourself or
override them.
æKY TList
æHY TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFi UList.p
æT CLASS
æC TList implements a simple list of objects. An instance of TList can contain a
list whose elements are references to instances of any class. Such lists can be
useful for performing an action on several objects. For example, an application
might keep all displayable objects in an instance of TList. If the application
needed to update all the displayed objects, it could simply send an appropriate
message to each item in the list.
æKY TListView
æHY TListView—>TView—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TListView is an abstract class that provides methods for managing views of lists
of data. In particular, several of its methods implement views that display
lists of objects and classes. The methods of this class are internal to the
MacApp Inspector; you cannot call them yourself or override them. You should use
TGridView, TTextGridView or TTextListView for general display of data in a list or
grid format.
æKY TNewDocCommand
æHY TNewDocCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TNewDocCommand creates a new document window when the New command is chosen from
the File menu. If desired, TNewDocCommand can also create a new document when
the application is launched.
æKY TNoChangesCommand
æHY TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TNoChangesCommand is an abstract class containing one method, INoChangesCommand,
which sets the fCanUndo and fCausesChange fields of the command object to
FALSE. TNoChangesCommand itself causes no change to any document; its subclasses,
however, provide methods that handle a variety of document- and
window-management commands.
æKY TNumberText
æHY TNumberText—>TEditText—>TStaticText—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC TNumberText, a simple subclass of TEditText, implements an editable text item
that accepts only numbers that fall in a specified range.
æKY TObject
æHY TObject
æFi UObject.p
æT CLASS
æC TObject is an abstract class, the ancestor of all objects in MacApp. Its primary
purpose is to provide common behavior that all classes share. All MacApp
classes, which are subclasses of TObject, inherit this common behavior. Behavior
provided by TObject includes cloning (making a copy of an instance) and freeing
(deallocating memory used by an instance).
æKY TObjectList
æHY TObjectList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TObjectList objects maintain lists of objects. The MacApp Inspector uses
TObjectList objects to store lists of the active objects in a running application. The
methods of this class are internal to the MacApp Inspector; you cannot call
them yourself or override them.
æKY TObjectView
æHY TObjectView—>TListView—>TView—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TObjectView implements a view which displays a list of the fields in an object
instance. The methods of this class are internal to the MacApp Inspector; you
cannot call them yourself or override them.
æKY TObjListView
æHY TObjListView—>TListView—>TView—>TEvtHandler—>TObject
æFm UInspector.inc1.p
æT CLASS
æC TObjListView implements a view of a list of object instances displayed by the
Inspector. The methods of this class are internal to the MacApp Inspector; you
cannot call them yourself or override them.
æKY TOldDocCommand
æHY TOldDocCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TOldDocCommand is a specialized subclass of TNoChangesCommand that MacApp uses
for opening saved documents when the user chooses the Open command from the File
menu.
æKY TPattern
æHY TPattern—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC TPattern provides methods for displaying a simple fill pattern. Instances of
TPattern can be used, for example, to fill scroll bars in dialog boxes.
æKY TPicture
æHY TPicture—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a picture item that can serve as a simple button. The
picture item can be arbitrarily large.
æKY TPopup
æHY TPopup—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC TPopup implements a simple pop-up menu selector, following the guidelines for
pop-up menus established in Apple Computer’s Human Interface Guidelines. See
Inside Macintosh, pages V-241 and V-242, for an explanation.
æKY TPrintCommand
æHY TPrintCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UPrinting.p
æT CLASS
æC TPrintCommand objects provide general printing functions.
æKY TPrintHandler
æHY TPrintHandler—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TPrintHandler provides methods necessary to print the data displayed in a
document.
æKY TPrintStyleChangeCommand
æHY TPrintStyleChangeCommand—>TCommand—>TObject
æFi UPrinting.p
æT CLASS
æC TPrintStyleChangeCommand is a subclass of TCommand that allows the user to make
changes in the Page Setup dialog box and undo them. TPrintStyleChangeCommand
contains methods for making and undoing changes to Page Setup, and freeing memory
used by the print record.
æKY TPtrBasedDoublyLinkedList
æHY TPtrBasedDoublyLinkedList—>TObject
æFi UList.p
æT CLASS
æC TPtrBasedDoublyLinkedList, a subclass of TObject, manages a doubly linked list
of nodes. The nodes are pointer based, since they are usually on the stack.
æKY TQuitCommand
æHY TQuitCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TQuitCommand is a specialized subclass of TNoChangesCommand that MacApp uses to
close applications.
æKY TRadio
æHY TRadio—>TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a Control Manager radio button control.
æKY TRCSelectCommand
æHY TRCSelectCommand—>TCellSelectCommand—>TCommand—>TObject
æFi UGridView.p
æT CLASS
æC The TRCSelectCommand class is an abstract superclass that defines methods for
selecting cells in views implemented by TGridView, TTextGridView, and
TTextListView. TRCSelectCommand also has methods for initializing and freeing command
objects, highlighting selections, and providing the user with onscreen feedback.
æKY TRevertDocCommand
æHY TRevertDocCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TRevertDocCommand has methods that allow a document to revert to the last
version saved on disk.
æKY TRowSelectCommand
æHY TRowSelectCommand—>TRCSelectCommand—>TCellSelectCommand—>TCommand—>TObject
æFi UGridView.p
æT CLASS
æC TRowSelectCommand objects are capable of selecting whole rows of cells in
TGridView objects.
æKY TRunArray
æHY TRunArray—>TObject
æFi UGridView.p
æT CLASS
æC The TRunArray class is used to maintain column widths and row heights. Entries
in the array are values for a given item, where the items are indexed from 1.
The fNoOfItems field indicates the number of items (and values) in the array. The
values are maintained in "chunks" —that is, consecutive items with the same
value are clumped together.
æKY TSaveDocCommand
æHY TSaveDocCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TSaveDocCommand has methods that save a document or a copy on disk.
æKY TScrollBar
æHY TScrollBar—>TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TScrollBar implements a standard Macintosh scroll bar, either vertical or
horizontal, depending on the parameters with which it is created. The scroll bar is
suitable for use as a control in a dialog box. Instances of TScrollBar can also
be used to scroll text or graphics in the content region of a window, but
instead you usually use TSScrollBar, a subclass of TScrollBar whose behavior is
specialized for scrolling text or graphics to make such uses easier.
æKY TScroller
æHY TScroller—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC A TScroller is a view whose specialty is coordinate adjustments. To create a
scrolling area, you install a TScroller object as a subview in a window and then
install the view that actually draws in the window as a subview of the TScroller
object. The TScroller object handles messages from TSScrollBar objects by
adjusting coordinate-plane offsets. When, for example, the user clicks the down
arrow in the vertical scroll bar, the window’s TScroller object adjusts its
coordinate plane so that all contents are drawn farther from the bottom of the
window. For example, given a scroller whose size is 100 pixels in both directions and
a subview located at (0,0) whose size is 1000 pixels, then a translation value
of (300,500) will display the part of the subview defined by the rectangle
(300,500)/(400,600). A scroller may refer to a vertical and horizontal scroll bar,
whose values are synchronized with the scroller’s translation values.
Furthermore, it is possible to scroll without using scroll bars by calling the
appropriate scroller methods to change the translation value.
æKY TSortedList
æHY TSortedList—>TList—>TDynamicArray—>TPtrBasedDoublyLinkedList—>TObject
æFi UList.p
æT CLASS
æC MacApp 2.0 includes a subclass of TList called TSortedList. TSortedList
implements a list of objects that are maintained in sorted order. Sorting presupposes
some way to rank objects in the list with respect to each other. For this
reason, the TSortedList class defines the Compare method.
æKY TSScrollBar
æHY TSScrollBar—>TScrollBar—>TCtlMgr—>TControl—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TSScrollBar, a subclass of TScrollBar, simplifies content-region scrolling by
interacting with TScroller objects. In response to user actions, TSScrollBar
objects can pass messages to TScroller objects. The TScroller objects can then make
the appropriate adjustments in the coordinate space of the window’s content
region so that the programmer doesn’t have to calculate offsets and change the
coordinates’ origin. A single scroll bar can be associated with any number of
scrollers. Each scroller is responsible for its own scrolling according to
messages sent to it from its scroll bars.
æKY TStaticText
æHY TStaticText—>TControl—>TView—>TEvtHandler—>TObject
æFi UDialog.p
æT CLASS
æC This class implements a static text item that can serve as a form of button. The
text cannot be edited by the user.
æKY TStdPrintHandler
æHY TStdPrintHandler—>TPrintHandler—>TEvtHandler—>TObject
æFi UPrinting.p
æT CLASS
æC TStdPrintHandler provides standard printing behavior for applications.
æKY TTECommand
æHY TTECommand—>TCommand—>TObject
æFi UTEView.p
æT CLASS
æC TTECommand provides methods that add or delete characters in a TEView view and
allow for text changes to be undone or redone. It is a superclass for commands
that cut, copy, paste, clear, and type text.
æKY TTECutCopyCommand
æHY TTECutCopyCommand—>TTECommand—>TCommand—>TObject
æFi UTEView.p
æT CLASS
æC TTECutCopyCommand is a specialized subclass of TTECommand that cuts or copies
data in a TEView view to another TEView view installed in the Clipboard.
TTECutCopyCommand has methods for initializing and freeing command objects, executing
commands, and restoring deletions.
æKY TTEPasteCommand
æHY TTEPasteCommand—>TTECommand—>TCommand—>TObject
æFi UTEView.p
æT CLASS
æC TTEPasteCommand is a subclass of TTECommand. Its ITEPasteCommand method
initializes the command object used by TTEViews to paste Clipboard data.(This method
doesn't use the Toolbox TEPaste routine, because that routine destroys the desk
scrap; the text would be recoverable from the special TextEdit Scrap, although
other types of non-TEXT scrap are permanently lost.)
æKY TTEStyleCommand
æHY TTEStyleCommand—>TTECommand—>TCommand—>TObject
æFi UTEView.p
æT CLASS
æC TTEStyleCommand provides methods for implementing styles in TextEdit text. In
old TextEdit text, these methods implement single styles. In the MacApp 2.0
version of TextEdit, these methods implement multiple styles in TextEdit text.
TTEStyleCommand also provides methods for undoing and redoing style changes.
æKY TTETypingCommand
æHY TTETypingCommand—>TTECommand—>TCommand—>TObject
æFi UTEView.p
æT CLASS
æC TTETypingCommand is a specialized subclass of TTECommand that emulates Macintosh
Toolbox TextEdit. A record of overtyped or stricken characters in
TTETypingCommand.AddCharacter allows typing to be undone.
æKY TTEView
æHY TTEView—>TView—>TEvtHandler—>TObject
æFi UTEView.p
æT CLASS
æC TTEView provides a view with the the basic function of TextEdit. TTEView is a
view subclass representing a TextEdit record. TextEdit is the simple text-editing
facility built into the Macintosh ROM.The purpose of a TTEView is to ensure
proper functioning (for instance, scrolling, printing, page breaks, and command
handling) of TextEdit in a MacApp environment.
æKY TTextGridView
æHY TTextGridView—>TGridView—>TView—>TEvtHandler—>TObject
æFi UGridView.p
æT CLASS
æC TTextGridView is a subclass of TGridView specialized for the creation of matrix
or grid representations of text data. A classic example of such a display is a
spreadsheet.
æKY TTextListView
æHY TTextListView—>TTextGridView—>TGridView—>TView—>TEvtHandler—>TObject
æFi UGridView.p
æT CLASS
æC TTextListView is a subclass of TTextGridView specialized for the display of a
one-dimensional, vertical, scrolling display of text items. It is usually used to
mimic the Macintosh Standard File Dialog box.
æKY TTranscriptView
æHY TTranscriptView—>TView—>TEvtHandler—>TObject
æFi UTranscriptView.p
æT CLASS
æC TTranscriptView provides the behavior for the content region of the Debug
Transcript window. Installed in a TWindow object, it behaves as a simple terminal
window. You can use TTranscriptView objects if you need to create such terminal
windows.
æKY TUndoRedoCommand
æHY TUndoRedoCommand—>TNoChangesCommand—>TCommand—>TObject
æFi UMacApp.p
æT CLASS
æC TUndoRedoCommand is a specialized subclass of TNoChangesCommand that contains
the methods needed to support the Undo and Redo menu items.
æKY TView
æHY TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TView is an abstract class, the ancestor of all classes that display images on
the Macintosh screen. With the exception of the desktop and pull-down menus,
everything visible on the screen in a MacApp application is normally drawn by
instances of TView’s subclasses. Examples of visible objects drawn by subclasses of
TView include windows, dialog boxes, scroll bars, icons, pop-up menus, and
check boxes. Most of the classes that handle user-generated events are descendants
of TView.
æKY TWindow
æHY TWindow—>TView—>TEvtHandler—>TObject
æFi UMacApp.p
æT CLASS
æC TWindow is a class that represents a Window Manager window. It responds to mouse
clicks outside the window’s content region, draws the window’s size box, and
overrides other view methods where appropriate. Since TWindow objects represent
windows, they never have superviews. They must have at least one subview or
nothing will be drawn in the window’s content region.
æKY Constants
æKL
bBoolean
bByte
bChar
bClass
bCmdNumber
bCntlAdornment
bConfigRec
bControlHandle
bDouble
bExtended
bFixed
bFontName
bGrafPtr
bHandle
bHexInteger
bHexLongInt
bHighByte
bHLState
bIDType
bInteger
bLongInt
bLowByte
bObject
bOSType
bPattern
bPoint
bPointer
bReal
bRect
bResType
bRGBColor
bRgnHandle
bScrapStuff
bSingle
bSizeDeterminer
bString
bStringHandle
bStyle
bTEHandle
bTextStyle
bTitle
bVCoordinate
bVHSelect
bVPoint
bVRect
bWindowPtr
bzCantDraw
bzCantUndo
bzClosing
bzDoFirstClick
bzDontDoFirstClick
bzHideClip
bzMakeModal
bzMakeModeless
bzQuitting
bzRedo
bzRevertAnyways
bzSaveAnyways
bzSaveAs
bzSaveCopy
bzSetLeftSysJust
bzSetRightSysJust
bzShowClip
bzUndo
bzUntitled
cAboutApp
cCantUndo
cChangePrinterStyle
cClear
cClose
cCopy
cCut
cDebugPrinting
cDebugWind
cDoFirstClick
cEditBase
cEditLast
cEditSep
cEnterMacAppDebugger
cExperimenting
cFinderNew
cFinderOpen
cFinderPrint
chBackspace
chClear
chDown
chEnd
chEnter
chEscape
chFunction
chFwdDelete
chHelp
chHome
chLeft
chPageDown
chPageUp
Chr00
Chr1F
chReturn
chRight
chSpace
chTab
chUp
cIdentifySoftware
cIntenseDebugging
cModalToggle
cMouseCommand
cNew
cNewInspectorWindow
cNewLast
cNoCommand
cOpen
cOpenLast
cPageSetup
cPaste
cPrFileBase
cPrFileMax
cPrint
cPrintOne
cPrintSpoolFile
cPrintToFile
cPrViewBase
cPrViewMax
cQuit
cReduce50
cReduceToFit
cRefreshFrontWindow
cRememberStyle
cReportEvt
cReportMenuChoices
cRevert
cSave
cSaveAs
cSaveCopy
cSelectAll
cSetSysJust
cShowBorders
cShowBreaks
cShowClipboard
cShowFullSize
cStyleChange
cTraceIdle
cTraceSetupMenus
cTrackingControl
cTyping
cUndo
cVarClipPicSize
errAppTable
errFileChanged
errFTypeChanged
errNoPrintDrvr
errNotImplemented
errNotMyType
errOperationsID
errReasonID
errRecoveryID
errRevertFNF
errSaveAgain
errSpooling
hlDim
hlDimOff
hlDimOn
hlOff
hlOffDim
hlOffOn
hlOn
hlOnDim
hlOnOff
kAdorn
kAEqualB
kAGreaterThanB
kALessThanB
kAllocationIncrement
kAllowApplicationToSleep
kApplFontName
kAskForFilename
kAutoWrap
kBuild
kClearVirtualCode
kCode
kControlOn
kCopyright
kDataOpen
kDebugBuzzStrings
kDebugFont
kDebugParamsID
kDebugSize
kDefaultCredits
kDefaultViewID
kDefaultWindowID
kDeSelect
kDontAdorn
kDontAlign
kDontExtend
kDontFlash
kDontHighlight
kDontInvalidate
kDontRedraw
kEmptyIndex
kEraseFirst
kErrorHandled
kEscapeVirtualCode
kExtend
kF10VirtualCode
kF11VirtualCode
kF12VirtualCode
kF13VirtualCode
kF14VirtualCode
kF15VirtualCode
kF1VirtualCode
kF2VirtualCode
kF3VirtualCode
kF4VirtualCode
kF5VirtualCode
kF6VirtualCode
kF7VirtualCode
kF8VirtualCode
kF9VirtualCode
kFailAbstract
kFailCoercion
kFailMethNotFound
kFailNone
kFixedSize
kFlash
kForceDepth
kForDisplay
kForPrinting
kFrame
kFwdDelVirtualCode
kGZMaxAlloc
kHexDigits
kHighlight
kHMargin
kIDBuzzString
kIDClipView
kIDClipWindow
kIDDefaultView
kIDMNTBbyCmdNumber
kInvalidate
kInvalidObj
kInvalidValue
kInvalidValueReasons
kInvisible
kItem1EqualItem2
kItem1GreaterThanItem2
kItem1LessThanItem2
kItemEqualCriteria
kItemGreaterThanCriteria
kItemLessThanCriteria
kIterateBackward
kIterateForward
kLeftPalette
kLMApFontID
kLMmapFalse
kLMmapTrue
kLMSysFontFam
kLMSysFontSize
kLMTESysJust
kLowSpaceInterval
kMakingCopy
kMANameSize
kMaxCoord
kMaxFlags
kMaxIdleTime
kMaxSignatures
kMaxSyms
kMaxTEWidth
kMBarDisplayed
kMBarHierarchical
kMBarNotDisplayed
kMinAhead
kMNTBbyCmdNumber
kMouseMovedMessage
kMoveBAbsolute
kMoveLAbsolute
kMoveLImmed
kMoveWAbsolute
kNeverInitialized
kNilClass
kNoAutoWrap
kNoButton
kNoEraseFirst
kNoFileRefnum
kNoIdentifier
kNonNumericCharacters
kNoOfDefaultReasons
kNoResource
kNoSpaceForCaret
kNoStaticLink
kNoTemplate
kPreferColor
kPrintDriverName
kPrintInfoSize
kPriorityHigh
kPriorityHighest
kPriorityLow
kPriorityLowest
kPriorityNormal
kRedraw
kRsrcCheckInterval
kRsrcFileOverhead
kRsrcOpen
kRsrcOverhead
kRsrcTypeOverhead
kSaveCurrentChars
kSBarSize
kSBarSizeMinus1
kScrollBarId
kSelect
kShowCantUndo
kShowRedo
kShowUndo
kSpaceForCaret
kSquareDots
kStdButton
kStdCheckBox
kStdCluster
kStdControl
kStdDefaultView
kStdDialogView
kStdDocument
kStdEditText
kStdGridView
kStdIcon
kStdList
kStdMainFileType
kStdNumberText
kStdPattern
kStdPicture
kStdPopup
kStdRadio
kStdScroller
kStdScrollUnit
kStdSScrollBar
kStdStaggerAmount
kStdStaticText
kStdSzMinus1SBar
kStdSzSBar
kStdTEView
kStdTextGridView
kStdTextListView
kStdTracker
kStdView
kStdWindow
kSuspendOrResume
kSwitchToTarget
kSysClear
kSysCopy
kSysCut
kSysFontName
kSysPaste
kSysUndo
kTooManyCharacters
kTopPalette
kUnlimited
kUsesDataFork
kUsesRsrcFork
kUsualPages
kValidValue
kValueTooLarge
kValueTooSmall
kViewRsrcExpandAmt
kVisible
kVMargin
kWantHScrollBar
kWantVScrollBar
kWatchDelay
kWithoutStyle
kWithStyle
kWordAlign
kWWEol
kYesButton
mApple
maxErr
mButtonHit
mCancelHit
mCancelKey
mCheckBoxHit
mClusterHit
mControlHit
mDebug
mDefaultKey
mEdit
mEditEnterKey
mEditReturnKey
mEditTabKey
mEditTextHit
mFile
mHScrollBarHit
mIconHit
minErr
mLastMenu
mListItemHit
mListScrollBarHit
mOKHit
mPatternHit
mPictureHit
mPopupHit
mRadioHit
msgAlert
msgAltRecovery
msgCancelled
msgCmdErr
msgDrawFailed
msgExportClipFailed
msgImportClipFailed
msgInitFailed
msgLookup
msgNewFailed
msgOpenFailed
msgPrintFailed
msgRevertFailed
msgSaveAsFailed
msgSaveCopyFailed
msgSaveFailed
msgStrList
mStaticTextHit
mVScrollBarHit
phAboutApp
phCmdErr
phFileChanged
phFinderPrintDialog
phGenError
phInvalidValue
phNoPages
phOfferReadOnly
phPurgeOld
phReopenDoc
phRevert
phSaveChanges
phSpaceIsLow
phSpoolPrintDialog
phStylesTooBig
phTooManyChars
phUnimplemented
phUnknownErr
phUnsupportedConfiguration
phWhichDoc
teJustSystem
æKY bBoolean
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pascal
BOOLEAN type.
æKY bByte
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pascal
BYTE type.
æKY bChar
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pascal
CHAR type.
æKY bClass
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a class
record.
æKY bCmdNumber
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a CmdNumber
type.
æKY bCntlAdornment
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a
CntlAdornment type.
æKY bConfigRec
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a ConfigRec
type.
æKY bControlHandle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a
ControlHandle type.
æKY bDouble
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Double
type.
æKY bExtended
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates an Extended
type.
æKY bFixed
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Fixed
type.
æKY bFontName
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a FontName
type.
æKY bGrafPtr
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a GrafPtr
type.
æKY bHandle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Handle
type.
æKY bHexInteger
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a HexInteger
type.
æKY bHexLongInt
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a HexLongInt
type.
æKY bHighByte
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates the high
byte of a word.
æKY bHLState
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates an HLState
(highlight state) type.
æKY bIDType
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a view
object identifier type.
æKY bInteger
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pascal
INTEGER type.
æKY bLongInt
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a LongInt
type.
æKY bLowByte
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates the low byte
of a word.
æKY bObject
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates an Object
type.
æKY bOSType
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates an OSType
type.
æKY bPattern
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pattern
type.
æKY bPoint
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Point
type.
æKY bPointer
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pointer
type.
æKY bReal
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Pascal
REAL type.
æKY bRect
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Rect type.
æKY bResType
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a ResType
type.
æKY bRGBColor
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates an RGBColor
type.
æKY bRgnHandle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a RgnHandle
type.
æKY bScrapStuff
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a ScrapStuff
type.
æKY bSingle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a SANE®
Single type.
æKY bSizeDeterminer
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a
SizeDeterminer type.
æKY bString
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a String
type.
æKY bStringHandle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a
StringHandle type.
æKY bStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Style
type.
æKY bTEHandle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a TEHandle
type.
æKY bTextStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a textStyle
type.
æKY bTitle
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a Title
type.
æKY bVCoordinate
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a
VCoordinate type.
æKY bVHSelect
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a VHSelect
type.
æKY bVPoint
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a VPoint
type.
æKY bVRect
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a VRect
type.
æKY bWindowPtr
æD
æFi UMacAppUtilities
æT CONSTANT
æC A field type indicator for the Fields method. This value indicates a WindowPtr
type.
æKY bzCantDraw
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (an 'STR#' resource
having ID=kBuzzString and the title mBuzzwords). The specified item is the text of
the “Unable to draw contents of window” error message.
æKY bzCantUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=kBuzzString and the title mBuzzwords). The specified item is the text of
the Can’t Undo menu item.
æKY bzClosing
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Closing alert message.
æKY bzDoFirstClick
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the Do
First Click For This Window menu item.
æKY bzDontDoFirstClick
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Don't Do First Click For This Window menu item.
æKY bzHideClip
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
“Hide Clipboard” menu item.
æKY bzMakeModal
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Make Front Window Modal menu item.
æKY bzMakeModeless
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Make Front Window Modeless menu item.
æKY bzQuitting
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Quitting alert message.
æKY bzRedo
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Redo menu item.
æKY bzRevertAnyways
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Revert menu item.
æKY bzSaveAnyways
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Save menu item.
æKY bzSaveAs
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Save As... menu item.
æKY bzSaveCopy
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Save a Copy menu item.
æKY bzSetLeftSysJust
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the Set
System to Left Justification menu item.
æKY bzSetRightSysJust
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the Set
System to Right Justification menu item.
æKY bzShowClip
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Show Clipboard menu item.
æKY bzUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is the text of the
Undo menu item.
æKY bzUntitled
æD
æFi UMacAppUtilities
æT CONSTANT
æC An index to an item in the MacApp buzz-string resource (a 'cmnu' resource
having ID=128 and the title mBuzzwords). The specified item is used as the title
for untitled documents. If the string is blank, the title is taken from the
window-title template; if you include the string “<<<>>>” in the bzUntitled
string, then MacApp will substitute a number for the string. For example, if the
buzz string contains “Untitled-<<<>>>”, untitled windows will be named “Untitled-
1”, “Untitled-2”, and so on.
æKY cAboutApp
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the About menu item.
æKY cCantUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Undo menu item when the command cannot be undone.
æKY cChangePrinterStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the command that handles the Page Setup dialog box.
æKY cClear
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Clear menu item.
æKY cClose
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Close menu item.
æKY cCopy
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Copy menu item.
æKY cCut
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Cut menu item.
æKY cDebugPrinting
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Debug Printing menu item in MacApp.
æKY cDebugWind
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Show Debug Transcript menu item in MacApp.
æKY cDoFirstClick
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Do First Click For This Window menu item in MacApp.
æKY cEditBase
æD
æFi UMacAppUtilities
æT CONSTANT
æC The lower bound for a range of command numbers reserved for editing operations.
æKY cEditLast
æD
æFi UMacAppUtilities
æT CONSTANT
æC The upper bound for a range of command numbers reserved for editing operations.
æKY cEditSep
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the line that separates the Undo and Cut items in the
Edit menu.
æKY cEnterMacAppDebugger
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Enter MacApp Debugger menu item in MacApp.
æKY cExperimenting
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Enable Experimental Features menu item in MacApp.
æKY cFinderNew
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number passed to the application when the user selects the
application’s icon from the Finder™ and chooses the Open menu item or launches the
application from the Finder by double-clicking it.
æKY cFinderOpen
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number passed to the application when the user selects a document
icon from the Finder™ and chooses the Open menu item or launches the application
by double-clicking on a document in the Finder.
æKY cFinderPrint
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number passed to the application when the user selects a document
icon in the Finder™ and chooses the Print menu item.
æKY chBackspace
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Delete key (or Backspace key on some keyboards) .
æKY chClear
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Clear key.
æKY chDown
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Down Arrow key.
æKY chEnd
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the End key.
æKY chEnter
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Enter key.
æKY chEscape
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Escape key.
æKY chFunction
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for any function key.
æKY chFwdDelete
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Forward Delete key.
æKY chHelp
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Help key.
æKY chHome
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Home key.
æKY chLeft
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Left Arrow key.
æKY chPageDown
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Page Down key.
æKY chPageUp
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Page Up key.
æKY Chr00
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the null character.
æKY Chr1F
æD
æFi UMacAppUtilities
æT CONSTANT
æC The character ($1F) that is the upper bound of the control character set Chr00–
Chr1F.
æKY chReturn
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Return key.
æKY chRight
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Right Arrow key.
æKY chSpace
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the space bar.
æKY chTab
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Tab key.
æKY chUp
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII code for the Up Arrow key.
æKY cIdentifySoftware
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number that causes the objects in the target chain to identify
themselves in the WriteLn window.
æKY cIntenseDebugging
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Intense Debugging menu item in MacApp.
æKY cModalToggle
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Make Front Window Modal and Make Front Window
Modeless menu items in MacApp.
æKY cMouseCommand
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for a generic mouse command.
æKY cNew
æD
æFi UMacAppUtilities
æT CONSTANT
æC The lower bound for a range of commands assigned to the New menu item.
æKY cNewInspectorWindow
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the New Inspector Window menu item in MacApp.
æKY cNewLast
æD
æFi UMacAppUtilities
æT CONSTANT
æC The upper bound for a range of command numbers assigned to the New menu item.
æKY cNoCommand
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number that represents no command.
æKY cOpen
æD
æFi UMacAppUtilities
æT CONSTANT
æC The lower bound for a range of command numbers assigned to the Open menu item.
æKY cOpenLast
æD
æFi UMacAppUtilities
æT CONSTANT
æC The upper bound for a range of command numbers assigned to the Open menu item.
æKY cPageSetup
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Page Setup menu item.
æKY cPaste
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Paste menu item.
æKY cPrFileBase
æD
æFi UMacAppUtilities
æT CONSTANT
æC The lower bound for a range of command numbers assigned to printing commands
used for files that are not displayed; they are used when the user is printing
from the Finder™. Command numbers between the values of cPrFileBase and cPrFileMax
are sent to the print handler for the document (as specified by the
fDocPrintHandler field), even if that print handler is not in the fTarget chain.
æKY cPrFileMax
æD
æFi UMacAppUtilities
æT CONSTANT
æC The upper bound of a range of command numbers assigned to printing commands
used for files that are not displayed; they are used when printing from the
Finder™. Command numbers between the values of cPrFileBase and cPrFileMax are sent
to a document's fDocPrintHandler even if it is not in the fTarget chain.
æKY cPrint
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Print menu item.
æKY cPrintOne
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Print One menu item.
æKY cPrintSpoolFile
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Print Spooled File menu item.
æKY cPrintToFile
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Print to File menu item.
æKY cPrViewBase
æD
æFi UMacAppUtilities
æT CONSTANT
æC The lower bound for a range of printing commands applied to a displayed view in
the fTarget chain.
æKY cPrViewMax
æD
æFi UMacAppUtilities
æT CONSTANT
æC The upper bound of a range of printing commands applied to a displayed view in
the fTarget chain.
æKY cQuit
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Quit menu item.
æKY cReduce50
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Reduce 50% menu item.
æKY cReduceToFit
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Reduce to Fit menu item.
æKY cRefreshFrontWindow
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Refresh Front Window menu item.
æKY cRememberStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number specifying that MacApp should save the current text style.
æKY cReportEvt
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Report Events menu item in MacApp
æKY cReportMenuChoices
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the MacApp debugger's Report Menu Commands option.
æKY cRevert
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Revert menu item.
æKY cSave
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Save menu item.
æKY cSaveAs
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Save As menu item.
æKY cSaveCopy
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Save a Copy In menu item.
æKY cSelectAll
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Select All menu item.
æKY cSetSysJust
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Switch System Justification menu item.
æKY cShowBorders
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Show View Borders menu item in MacApp.
Note: You must supply code to support the use of this command.
æKY cShowBreaks
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Show Page Breaks menu item.
æKY cShowClipboard
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Show Clipboard and Hide Clipboard menu items.
æKY cShowFullSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Show Full Size menu item.
æKY cStyleChange
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number indicating to MacApp that the current text style is being
changed.
æKY cTraceIdle
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Allow Trace During Idle menu item in MacApp.
æKY cTraceSetupMenus
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Trace Menu Setup menu item in MacApp.
æKY cTrackingControl
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number passed to TNoChangesCommand.INoChangesCommand when MaCapp is
creating a control tracker.
æKY cTyping
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number passed to MacApp in response to typing events.
æKY cUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the Undo and Redo menu items.
æKY cVarClipPicSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The command number for the MacApp menu item Scale Pictures in Clipboard to
Window.
æKY errAppTable
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value added to the MacApp resource ID to get the ID of an application's
error table.
æKY errFileChanged
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the modification date of the disk file has
changed.
æKY errFTypeChanged
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the type of the disk file has changed.
æKY errNoPrintDrvr
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the print driver file was not found.
æKY errNotImplemented
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating to the global routine Failure that a function is not
implemented.
æKY errNotMyType
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the application can't open a file of this type.
æKY errOperationsID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID of the errors resource that contains operation strings.
æKY errReasonID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID of the errors resource that describes error messages.
æKY errRecoveryID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID of the errors resource that describes recovery messages.
æKY errRevertFNF
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the revert operation failed because the last
saved version of the file was not found.
æKY errSaveAgain
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that the user issued the Save As or Save a Copy
command while another copy of the same document was already open.
æKY errSpooling
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code indicating that print spooling failed because of an operating
system error.
æKY hlDim
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state indicating that the selection is to be dimly highlighted.
æKY hlDimOff
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOff and hlDim
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY hlDimOn
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOn and hlDim
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY hlOff
æD
æFi UMacAppUtilities
æT CONSTANT
æC Highlighting is to be removed from the selection.
æKY hlOffDim
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOff and hlDim
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY hlOffOn
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOff and hlOn
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY hlOn
æD
æFi UMacAppUtilities
æT CONSTANT
æC The selection is to be fully highlighted.
æKY hlOnDim
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOn and hlDim
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY hlOnOff
æD
æFi UMacAppUtilities
æT CONSTANT
æC A highlight state that can be used to test for a combination of hlOn and hlOff
in the “from” state and the “to” state when it does not matter which state is
“from” and which is “to”.
æKY kAdorn
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies that the TGridView object is to draw its adornment when drawing its
contents.
æKY kAEqualB
æD
æFi UMacAppUtilities
æT CONSTANT
æC When returned from a comparison function in a TList object, this value
indicates that the first argument to the function is equal to the second argument.
æKY kAGreaterThanB
æD
æFi UMacAppUtilities
æT CONSTANT
æC When returned from a comparison function in a TList object, this value
indicates that the first argument to the function is greater than the second
argument.
æKY kALessThanB
æD
æFi UMacAppUtilities
æT CONSTANT
æC When returned from a comparison function in a TList object, this value
indicates that the first argument to the function is less than the second
argument.
æKY kAllocationIncrement
æD
æFi UMacAppUtilities
æT CONSTANT
æC The number of elements by which to increase or decrease the allocated size of
the list object when it needs to expand or shrink. This value is the default used
by TDynamicArray.fAllocationIncrement.
æKY kAllowApplicationToSleep
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to TApplication.PollEvent, this value indicates
that while no events are pending, the application is not to idle until the number
of ticks represented by kMaxIdleTime has elapsed. The kAllowApplicationToSleep
constant is used when the application is running in the MultiFinder® environment.
æKY kApplFontName
æD
æFi UMacAppUtilities
æT CONSTANT
æC The font for the text in the application.
æKY kAskForFilename
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TDocument.Save to prompt the user for a filename when saving an
untitled document.
æKY kAutoWrap
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox that it is to use word wrap when it
draws the text.
æKY kBuild
æD
æFi UMacAppUtilities
æT CONSTANT
æC When used as the build parameter to TWindow.BuildWindowRgns, kBuild specifies
that the method must calculate window size, including the structure region (title
bar).
æKY kClearVirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the Clear key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates a resource of type 'CODE'.
æKY kControlOn
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TCheckBox.ICheckBox and TRadio.IRadio that the control is to be
initialized in the "on" state.
æKY kCopyright
æD
æFi UMacAppUtilities
æT CONSTANT
æC The text of the copyright notice for MacApp.
æKY kDataOpen
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.IDocument that the document is to keep its file's data
fork open when the document is open.
æKY kDebugBuzzStrings
æD
æFi UMacAppUtilities
æT CONSTANT
æC The buzzwords STR# resource used by the MacApp debugger.
æKY kDebugFont
æD
æFi UMacAppUtilities
æT CONSTANT
æC The font for the text in the Debug Transcript window.
æKY kDebugParamsID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the Debug Transcript window.
æKY kDebugSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The font size for text in the Debug Transcript window.
æKY kDefaultCredits
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID of the 'STR#' resource containing the names of the people who
contributed significantly to the creation of MacApp.
æKY kDefaultViewID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID for the default 'view' resource installed in the default
window.
æKY kDefaultWindowID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID for the default window 'view' resource opened with a TDocument
object.
æKY kDeSelect
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to selection and highlighting methods that previous selections are to
be deselected.
æKY kDontAdorn
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to TGridView.IGridView, this value specifies that
the TGridView object is not to draw its adornment when drawing its contents.
æKY kDontAlign
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value passed to the global routine OffsetPtr indicating that offsets are
not to be word-aligned.
æKY kDontExtend
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TGridView selection and highlighting methods that they are not to
extend previous selections.
æKY kDontFlash
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TDialogView.Dismiss that selected dialog items are not to flash.
æKY kDontHighlight
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TGridView highlighting and selection methods that a selected cell
is not to be highlighted.
æKY kDontInvalidate
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to routines with invalidate parameters that the view is not to be
invalidated.
æKY kDontRedraw
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to routines with redraw parameters that the view is not to be
redrawn.
æKY kEmptyIndex
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that no valid index is available (indexes are always positive
values).
æKY kEraseFirst
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox to erase the rectangle before
drawing.
æKY kErrorHandled
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that it is not necessary to post an alert message because the error
condition was handled by the user.
æKY kEscapeVirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the Escape key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kExtend
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TGridView selection and highlighting methods that they are to
extend previous selections.
æKY kF10VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F10 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF11VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F11 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF12VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F12 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF13VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F13 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF14VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F14 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF15VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F15 key. For more information on virtual key
codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF1VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F1 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF2VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F2 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF3VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F3 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF4VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F4 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF5VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F5 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF6VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F6 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF7VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F7 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF8VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F8 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kF9VirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the F9 key. For more information on virtual key codes,
see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kFailAbstract
æD
æFi UMacAppUtilities
æT CONSTANT
æC This constant is not yet documented; it is used internally by MacApp. You
never need to use it yourself. ??? it is allowed but not used by the global
routine OBJFail.???
æKY kFailCoercion
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned by a failure handler indicating that the type coercion of an
object failed.
æKY kFailMethNotFound
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned by a failure handler indicating that a specified method is
not defined.
æKY kFailNone
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates an object failure for a reason other than those represented by the
constants kFailAbstract, kFailCoercion, kFailMethNotFound, or kInvalidObj. This
value is allowed, but not used, by the global routine OBJFail.
æKY kFixedSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to print handlers that the view is not to be resized.
æKY kFlash
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TDialogView.Dismiss that selected dialog items should flash.
æKY kForceDepth
æD
æFi UMacAppUtilities
æT CONSTANT
æC The number of elements in the internal stack of forced output states maintained
by MacApp, which is created by calling the global routine ForceOutput.
æKY kForDisplay
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.DoMakeViews that the view is for display on the screen
rather than for printing.
æKY kForPrinting
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.DoMakeViews that the view is for printing rather than
for display on the screen.
æKY kFrame
æD
æFi UMacAppUtilities
æT CONSTANT
æC A set of adornment identifiers that specifies a rectangular frame around a
view.
æKY kFwdDelVirtualCode
æD
æFi UMacAppUtilities
æT CONSTANT
æC The virtual key code for the Forward Delete key. For more information on
virtual key codes, see the discussion on page 190 of Inside Macintosh, Volume V.
æKY kGZMaxAlloc
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine BuildCodeReserve to allocate the maximum amount
of memory reserve space.
æKY kHexDigits
æD
æFi UMacAppUtilities
æT CONSTANT
æC The ASCII characters that constitute legal digits in a hexadecimal number.
æKY kHighlight
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TGridView highlighting and selection methods that a selected cell
is to be highlighted.
æKY kHMargin
æD
æFi UMacAppUtilities
æT CONSTANT
æC The size, in pixels, of the horizontal margin of the Debug Transcript window.
æKY kIDBuzzString
æD
æFi UMacAppUtilities
æT CONSTANT
æC The standard list of buzzwords stored as 'STR#' resources. This string list is
reserved for MacApp; you should choose a different resource ID for your strings.
æKY kIDClipView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the clipboard “orphanage” (gClipOrphanage), which is a view
that displays the public desk scrap when your application is launched or when
control is returned to your application from a desk accessory or another
application.
æKY kIDClipWindow
æD
æFi UMacAppUtilities
æT CONSTANT
æC The window that displays the Clipboard data.
æKY kIDDefaultView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The view identifier of the default view.
æKY kIDMNTBbyCmdNumber
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the table of menu command numbers.
æKY kInvalidate
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to routines with invalidate parameters that the view is to be
invalidated.
æKY kInvalidObj
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned when the data tested does not constitute a valid object.
æKY kInvalidValue
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that an invalid value was entered in a TDialogView object's text
field.
æKY kInvalidValueReasons
æD
æFi UMacAppUtilities
æT CONSTANT
æC The string list used in alert messages for invalid values.
æKY kInvisible
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value passed as a parameter to TDocument.OpenDocFile indicating that the
document’s window is to be invisible.
æKY kItem1EqualItem2
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned by TSortedList.Compare to indicate that the two items
compared are of equal value.
æKY kItem1GreaterThanItem2
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned by TSortedList.Compare to indicate that the value of the
first item is greater than that of the comparison criteria.
æKY kItem1LessThanItem2
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value returned by TSortedList.Compare to indicate that the value of the
first item is less than that of the comparison criteria.
æKY kItemEqualCriteria
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value used by TSortedList.Search to determine that an item meets the test
criteria.
æKY kItemGreaterThanCriteria
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value used by TSortedList.Search to determine that an item is of greater
value than the criteria with which it is being compared.
æKY kItemLessThanCriteria
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value used by TSortedList.Search to determine that an item is of lesser
value than the criteria with which it is being compared.
æKY kIterateBackward
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to methods of UList that they are to proceed from the last element of
the list toward the first when iterating over the methods in a list.
æKY kIterateForward
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to methods of UList that they are to proceed from the first element
of the list toward the last when iterating over the methods in a list.
æKY kLeftPalette
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to the global routine NewPaletteWindow that the window it creates is
to have a nonscrolling palette along its left edge.
æKY kLMApFontID
æD
æFi UMacAppUtilities
æT CONSTANT
æC The address of the low-memory global containing the application font
identifier.
æKY kLMmapFalse
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine UseROMMap that it is not to search the map of
ROM resources.
æKY kLMmapTrue
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine UseROMMap that it is to search the map of ROM
resources.
æKY kLMSysFontFam
æD
æFi UMacAppUtilities
æT CONSTANT
æC The low-memory global containing the font family ID of the system font; if
there is no font family ID, this value is 0.
æKY kLMSysFontSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The low-memory global containing the system font size; if the font size is 12
point, this value is 0.
æKY kLMTESysJust
æD
æFi UMacAppUtilities
æT CONSTANT
æC The low-memory global containing the system text justification. This constant
is not supported on 64 KB ROMs.
æKY kLowSpaceInterval
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default interval (2 seconds) that MacApp waits before displaying a low-
memory alert.
æKY kMakingCopy
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to the method TDocument.Save that the save operation is for making a
copy of the document rather than for replacing the old one.
æKY kMANameSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The maximum length of an MAName strin g.
æKY kMaxCoord
æD
æFi UMacAppUtilities
æT CONSTANT
æC The largest acceptable value for a QuickDraw view coordinate (QuickDraw's
maximum permissible value minus the amount that allows for the size of the
screen).
æKY kMaxFlags
æD
æFi UMacAppUtilities
æT CONSTANT
æC The maximum number of flags that can be set in the MacApp debugger.
æKY kMaxIdleTime
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to a TEvtHandler object that it is not to idle. This is the default
value to which a TEvtHandler object's fIdleFreq field is initialized.
æKY kMaxSignatures
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates the maximum number of object types allowed in MacApp.
æKY kMaxSyms
æD
æFi UMacAppUtilities
æT CONSTANT
æC The maximum number of symbols that can be used in the MacApp debugger.
æKY kMaxTEWidth
æD
æFi UMacAppUtilities
æT CONSTANT
æC The maximum width, in pixels, that a TEditText view is allowed to autoscroll.
æKY kMBarDisplayed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default 'MBAR' ID of the menus that are read in and installed in the menu
bar.
æKY kMBarHierarchical
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default 'MBAR' ID for menus that pop up when a hierarchichal menu item is
chosen.
æKY kMBarNotDisplayed
æD
æFi UMacAppUtilities
æT CONSTANT
æC Default 'MBAR' ID of the pop-up menus that are read in but not installed in the
menu bar.
æKY kMinAhead
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates the minimum amount by which to the view is to autoscroll ahead when
the selection is being scrolled into view.
æKY kMNTBbyCmdNumber
æD
æFi UMacAppUtilities
æT CONSTANT
æC The table of menu commands listed in order of command numbers.
æKY kMouseMovedMessage
æD
æFi UMacAppUtilities
æT CONSTANT
æC An event-message mask used by MultiFinder® to mask out all events except mouse-
moved events. For more information on event-message masks in general, see the
discussion on page 253 of Inside Macintosh, Volume I.
æKY kMoveBAbsolute
æD
æFi UMacAppUtilities
æT CONSTANT
æC Represents the 68xxx assembly-language instruction MOVE.B of absolute Address
data to (SP).
æKY kMoveLAbsolute
æD
æFi UMacAppUtilities
æT CONSTANT
æC Represents the 68xxx assembly-language instruction MOVE.L of absolute Address
data to (SP).
æKY kMoveLImmed
æD
æFi UMacAppUtilities
æT CONSTANT
æC Represents the 68xxx assembly-language instruction MOVE.L of immediate data to
(SP).
æKY kMoveWAbsolute
æD
æFi UMacAppUtilities
æT CONSTANT
æC Represents the 68xxx assembly-language instruction MOVE.W of absolute Address
data to (SP).
æKY kNeverInitialized
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to TStdPrintHandler methods that they are to call
TStdPrintHandler.PrinterChanged.
æKY kNilClass
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value for the superclass of TObject.
æKY kNoAutoWrap
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox that it is not to use word wrap the
when it draws the text.
æKY kNoButton
æD
æFi UMacAppUtilities
æT CONSTANT
æC The No button in various dialog boxes.
æKY kNoEraseFirst
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox that it is not to erase the rectangle
before drawing.
æKY kNoFileRefnum
æD
æFi UMacAppUtilities
æT CONSTANT
æC An invalid file reference number. This number is used to indicate an unopened
file, and is interpreted by HFS as a volume number.
æKY kNoIdentifier
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indciates an invalid resource identifier. This value has four blank spaces that
take the place of the four characters in a valid resource ID.
æKY kNonNumericCharacters
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates a non-numeric character.
æKY kNoOfDefaultReasons
æD
æFi UMacAppUtilities
æT CONSTANT
æC The number of default error messages returned by TDialogView methods. This
constant is used only by the method TDialogView.CantDeselect.
æKY kNoResource
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that a resource is unavailable.
æKY kNoSpaceForCaret
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox that the size of the rectangle is not
to increase to account for the presence of the text insertion point.
æKY kNoStaticLink
æD
æFi UMacAppUtilities
æT CONSTANT
æC A non-nil placeholder passed by C++ users to Object Pascal routines that use a
procedure as a parameter. The kNoStaticLink constant is passed when only local
variable access is used or needed. For more information, see the kNoStaticLink
comment in the file UMacAppUtilities.p.
æKY kNoTemplate
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that a resource template is unavailable.
æKY kPreferColor
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that MacApp is to attempt to load a 'cicn' resource before attempting
to load an 'ICON' resource.
æKY kPrintDriverName
æD
æFi UMacAppUtilities
æT CONSTANT
æC The address of the System file 'STR#' resource containing the name of the
current print driver.
æKY kPrintInfoSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The size, in bytes, of a printInfo record in bytes.
æKY kPriorityHigh
æD
æFi UMacAppUtilities
æT CONSTANT
æC A constant of type CommandPriority that can be used to prioritize commands
posted to the command queue by TApplication.PostCommand. High-priority commands
are handled before all other commands except those having highest priority.
æKY kPriorityHighest
æD
æFi UMacAppUtilities
æT CONSTANT
æC A constant of type CommandPriority that can be used to prioritize commands
posted to the command queue by TApplication.PostCommand. Commands having highest
priority are handled before any others.
æKY kPriorityLow
æD
æFi UMacAppUtilities
æT CONSTANT
æC A constant of type CommandPriority that can be used to prioritize commands
posted to the command queue by TApplication.PostCommand. Low-priority commands are
handled after commands having normal, high, or highest priority, but before
commands having lowest priority.
æKY kPriorityLowest
æD
æFi UMacAppUtilities
æT CONSTANT
æC A constant of type CommandPriority that can be used to prioritize commands
posted to the command queue by TApplication.PostCommand. Commands having lowest
priority are handled after commands having low, normal, high, or highest priority.
æKY kPriorityNormal
æD
æFi UMacAppUtilities
æT CONSTANT
æC A constant of type CommandPriority that can be used to prioritize commands
posted to the command queue by TApplication.PostCommand. Normal priority is the
default priority assigned to commands that are prioritized. Commands having normal
priority are handled after highest- and high-priority commands, but before low-
and lowest-priority commands.
æKY kRedraw
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to routines with redraw parameters that the view is to be redrawn.
æKY kRsrcCheckInterval
æD
æFi UMacAppUtilities
æT CONSTANT
æC This constnat is not yet documented; it is used internally by MacApp. You never
need to use it yourself.
æKY kRsrcFileOverhead
æD
æFi UMacAppUtilities
æT CONSTANT
æC The size, in bytes, of the resource header, the fixed part of the resource map,
and miscellaneous other resource file overhead30.
æKY kRsrcOpen
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.IDocument that the document is to keep its file's
resource fork open when the document is open.
æKY kRsrcOverhead
æD
æFi UMacAppUtilities
æT CONSTANT
æC The amount of disk space, expressed in bytes, that is needed for each resource
in the document's resource fork.
æKY kRsrcTypeOverhead
æD
æFi UMacAppUtilities
æT CONSTANT
æC The amount of the disk space necessary for each unique resource type in the
document's resource fork, expressed in bytes.
æKY kSaveCurrentChars
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TTECommand.ITECommand to store the text from the current text
record when creating a new text record.
æKY kSBarSize
æD
æFi UMacAppUtilities
æT CONSTANT
æC The width of a scroll bar, expressed in pixels.
æKY kSBarSizeMinus1
æD
æFi UMacAppUtilities
æT CONSTANT
æC The offset from the edge of a window’s content region to the edge of the region
where drawing takes place (the width of a scroll bar minus 1).
æKY kScrollBarId
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource ID of the scroll bar resource.
æKY kSelect
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TGridView selection methods that a cell is to be selected.
æKY kShowCantUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC The argument to TApplication.SetUndoText that changes the text of the Undo menu
item to Can’t Undo.
æKY kShowRedo
æD
æFi UMacAppUtilities
æT CONSTANT
æC The argument to TApplication.SetUndoText that changes the text of the Undo menu
item to Redo.
æKY kShowUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC The argument to TApplication.SetUndoText that changes the text of the Undo menu
item to Undo—as opposed to Redo or Can't Undo, for example.
æKY kSpaceForCaret
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to the global routine MATextBox that it is to increase the size of
the rectangle to leave space for the text insertion point.
æKY kSquareDots
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies that the print image is to be computed using square dots.
æKY kStdButton
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard button object “by signature.”
æKY kStdCheckBox
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard check box object “by
signature.”
æKY kStdCluster
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TCluster object “by signature.”
æKY kStdControl
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TControl object “by signature.”
æKY kStdDefaultView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TView object “by signature.”
æKY kStdDialogView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TDialogView object “by
signature.”
æKY kStdDocument
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard document object “by signature.”
æKY kStdEditText
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TEditText object “by
signature.”
æKY kStdGridView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TGridView object “by
signature.”
æKY kStdIcon
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TIcon object “by signature.”
æKY kStdList
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard list object “by signature.”
æKY kStdMainFileType
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default file-type identifier.
æKY kStdNumberText
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TNumberText object “by
signature.”
æKY kStdPattern
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TPattern object “by signature.”
æKY kStdPicture
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TPicture object “by signature.”
æKY kStdPopup
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TPopup object “by signature.”
æKY kStdRadio
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TRadio object “by signature.”
æKY kStdScroller
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TScroller object “by signature.”
æKY kStdScrollUnit
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default value of the fScrollUnit field.
æKY kStdSScrollBar
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TSScrollBar object “by
signature.”
æKY kStdStaggerAmount
æD
æFi UMacAppUtilities
æT CONSTANT
æC The standard number of pixels by which to stagger windows.
æKY kStdStaticText
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TStaticText object “by
signature.”
æKY kStdSzMinus1SBar
æD
æFi UMacAppUtilities
æT CONSTANT
æC The width of a standard scroll bar minus 1.
æKY kStdSzSBar
æD
æFi UMacAppUtilities
æT CONSTANT
æC The width of a standard scroll bar.
æKY kStdTEView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TTEView object “by signature.”
æKY kStdTextGridView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TTextGridView object “by
signature.”
æKY kStdTextListView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TTextListView object “by
signature.”
æKY kStdTracker
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard mouse tracker object “by
signature.”
æKY kStdView
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TView object “by signature.”
æKY kStdWindow
æD
æFi UMacAppUtilities
æT CONSTANT
æC The object signature used to create a standard TWindow object “by signature.”
æKY kSuspendOrResume
æD
æFi UMacAppUtilities
æT CONSTANT
æC An event-message mask used by MultiFinder® to mask out all events except
suspend or resume events. For more information on event-message masks in general,
see the discussion on page 253 of Inside Macintosh, Volume I.
æKY kSwitchToTarget
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.Save that the file currently being saved is to replace
any copy of the file on the disk that has the same name.
æKY kSysClear
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to the Toolbox function SystemEdit, this value
indicates that the user chose the Clear command from the Edit menu while a desk
accessory was the active window. This constant is also used for range checking of
editing commands.
æKY kSysCopy
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to the Toolbox function SystemEdit, this value
indicates that the user chose the Copy command from the Edit menu while a desk
accessory was the active window. This constant is also used for range checking of
editing commands.
æKY kSysCut
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to the Toolbox function SystemEdit, this value
indicates that the user chose the Cut command from the Edit menu while a desk
accessory was the active window. This constant is also used for range checking of
editing commands.
æKY kSysFontName
æD
æFi UMacAppUtilities
æT CONSTANT
æC The name of the system font. The global routine GetFontNum returns a 0 when it
encounters this constant.
æKY kSysPaste
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to the Toolbox function SystemEdit, this value
indicates that the user chose the Paste command from the Edit menu while a desk
accessory was the active window. This constant is also used for range checking of
editing commands.
æKY kSysUndo
æD
æFi UMacAppUtilities
æT CONSTANT
æC When supplied as an argument to the Toolbox function SystemEdit, this value
indicates that the user chose the Undo command from the Edit menu while a desk
accessory was the active window. This constant is also used for range checking of
editing commands.
æKY kTooManyCharacters
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user entered too many characters in a text field.
æKY kTopPalette
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to the global routine NewPaletteWindow that the window it creates is
to have a non-scrolling status area at the top.
æKY kUnlimited
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies the maximum number of characters that can be in a TTEView object's
fText field.
æKY kUsesDataFork
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.IDocument that the document is to use its file's data
fork.
æKY kUsesRsrcFork
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TDocument.IDocument that the document is to use its file's
resource fork.
æKY kUsualPages
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates to methods with “pageNumber” parameters that a general setting is to
be used, rather than a setting customized to one particular page.
æKY kValidValue
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the value in a dialog box’s text field is valid.
æKY kValueTooLarge
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the value in a dialog box’s text field is too large.
æKY kValueTooSmall
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the value in a dialog box’s text field is too small.
æKY kViewRsrcExpandAmt
æD
æFi UMacAppUtilities
æT CONSTANT
æC The amount by which to increase the size of a 'view' resource.
æKY kVisible
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that a view is to be made visible.
æKY kVMargin
æD
æFi UMacAppUtilities
æT CONSTANT
æC The width, in pixels, of the margin around a view’s drawing area.
æKY kWantHScrollBar
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies that the view is to be associated with a horizontal scroll bar.
æKY kWantVScrollBar
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies that the view is to be associated with a vertical scroll bar.
æKY kWatchDelay
æD
æFi UMacAppUtilities
æT CONSTANT
æC The default amount of time, in ticks, that MacApp waits before changing the
arrow cursor to a wristwatch cursor.
æKY kWithoutStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TTEView.ITEView that the TTEView object does not support multiple
styles of text.
æKY kWithStyle
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to TTEView.ITEView tthat the TTEView object supports multiple styles
of text.
æKY kWordAlign
æD
æFi UMacAppUtilities
æT CONSTANT
æC Specifies to the global routine OffsetPtr that offsets are to be word-aligned.
æKY kWWEol
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates the end of the line to the MacApp debugger when writing to a window
(usually the Debug Transcript window).
æKY kYesButton
æD
æFi UMacAppUtilities
æT CONSTANT
æC The Yes button in various dialog boxes.
æKY mApple
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the Apple menu.
æKY maxErr
æD
æFi UMacAppUtilities
æT CONSTANT
æC The maximum value allowed for error numbers.
æKY mButtonHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TButton object.
æKY mCancelHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a Cancel button.
æKY mCancelKey
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user selected a Cancel button by pressing a key.
æKY mCheckBoxHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a check box.
æKY mClusterHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TCluster object.
æKY mControlHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a control.
æKY mDebug
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the Debug menu. It is read in if debugging is turned on; its
value corresponds with debugging command numbers.
æKY mDefaultKey
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user selected a default button by pressing a key.
æKY mEdit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user selected an item on the Edit menu.
æKY mEditEnterKey
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user pressed the Enter key while editing text.
æKY mEditReturnKey
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user pressed the Return key while editing text.
æKY mEditTabKey
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user pressed the Tab key while editing text.
æKY mEditTextHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked in a text box that can be edited.
æKY mFile
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user selected an item on the File menu.
æKY mHScrollBarHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked in a scroll bar.
æKY mIconHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked an icon.
æKY minErr
æD
æFi UMacAppUtilities
æT CONSTANT
æC The minimum value allowed for error numbers.
æKY mLastMenu
æD
æFi UMacAppUtilities
æT CONSTANT
æC The identifier of the "last" menu in the menu bar. The global routine
PerformMenuSetup works only on menus having identifiers whose values are between 1
and mLastMenu; you can define menus having identifiers greater than the value of
mLastMenu to optimize menu setup. For more information, see the "Theory of
Operation" comment in the file UMenuSetup.p.
æKY mListItemHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user selected an item in a list.
æKY mListScrollBarHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked in the scroll bar of a TListView list.
æKY mOKHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked an OK button.
æKY mPatternHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TPattern object.
æKY mPictureHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TPicture object.
æKY mPopupHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TPopup object.
æKY mRadioHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TRadio object.
æKY msgAlert
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value that MacApp adds to an alert number to obtain the number associated
with the appropriate message.
æKY msgAltRecovery
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value used in an alternate scheme of looking up error recovery strings.
æKY msgCancelled
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates no error when certain operations fail because the user cancelled
them.
æKY msgCmdErr
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value that MacApp uses to fill in the message "Could not complete the …
command …" MacApp adds the value of msgCmdErr to a command number and uses that
number to find the appropriate parameters for the message.
æKY msgDrawFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when a view fails to draw its contents.
æKY msgExportClipFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when a view fails to export its contents to the
Clipboard.
æKY msgImportClipFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when a view fails to import the contents of the
Clipboard.
æKY msgInitFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when an object fails to initialize itself.
æKY msgLookup
æD
æFi UMacAppUtilities
æT CONSTANT
æC The value that MacApp uses to fill in the message “Could not … because …”
MacApp adds the value to an integer and uses that number to find the appropriate
parameters in the errOperationsID table.
æKY msgNewFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the New menu command fails.
æKY msgOpenFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the Open menu command fails.
æKY msgPrintFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the Print menu command fails.
æKY msgRevertFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the Revert menu item fails.
æKY msgSaveAsFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the Save As menu item fails.
æKY msgSaveCopyFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when the handler for the Save a Copy In menu item
fails.
æKY msgSaveFailed
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error code that results when a handler for the Save menu item fails.
æKY msgStrList
æD
æFi UMacAppUtilities
æT CONSTANT
æC The standard list of operation strings used by MacApp.
æKY mStaticTextHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked a TStaticText object.
æKY mVScrollBarHit
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that the user clicked in a vertical scroll bar.
æKY phAboutApp
æD
æFi UMacAppUtilities
æT CONSTANT
æC The resource identifier of the About box.
æKY phCmdErr
æD
æFi UMacAppUtilities
æT CONSTANT
æC An error message that makes use of parameterized text to display the message
“Could not complete the “^2” command because ^0. ^1”.
æKY phFileChanged
æD
æFi UMacAppUtilities
æT CONSTANT
æC The error message displayed if the file has changed since it was last saved on
the disk.
æKY phFinderPrintDialog
æD
æFi UMacAppUtilities
æT CONSTANT
æC The dialog box displayed when the user is printing from the Finder. This
dialog box includes a Cancel All Printing button; the dialog box represented by
phSpoolPrintDialog does not.
æKY phGenError
æD
æFi UMacAppUtilities
æT CONSTANT
æC A generic error message that uses parameterized text to display the message
“Could not ^2, because ^0. ^1.”
æKY phInvalidValue
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when the user enters an invalid value.
æKY phNoPages
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when the user enters an invalid page range in the print
dialog box.
æKY phOfferReadOnly
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when a file cannot be opened for write access and the
application offers to open it for read-only access.
æKY phPurgeOld
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when the application must attempt a save-in-place
operation.
æKY phReopenDoc
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when the user attempts to open a document that is already
open.
æKY phRevert
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message that confirms the user's command to restore the state of the
document to the state that was previously saved on the disk.
æKY phSaveChanges
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when the user closes a document that has changed since it
was last saved.
æKY phSpaceIsLow
æD
æFi UMacAppUtilities
æT CONSTANT
æC The message displayed when MacApp is close to running out of memory.
æKY phSpoolPrintDialog
æD
æFi UMacAppUtilities
æT CONSTANT
æC The dialog box displayed when the application is printing a file. The name is
somewhat misleading because this dialog box is also used when the application is
not spooling.
æKY phStylesTooBig
æD
æFi UMacAppUtilities
æT CONSTANT
æC The alert message used in the UTEView unit to reject the “styles” portion of a
paste operation.
æKY phTooManyChars
æD
æFi UMacAppUtilities
æT CONSTANT
æC The alert message used in the UDialog and UTEView unitsto reject excess
keystrokes or a paste operation that contains too much data.
æKY phUnimplemented
æD
æFi UMacAppUtilities
æT CONSTANT
æC The alert message used to respond to the user's choice of an unimplemented
command.
æKY phUnknownErr
æD
æFi UMacAppUtilities
æT CONSTANT
æC The alert displayed when no operation is supplied and the command fails; it
says “Could not complete your request because ^0. ^1.”
æKY phUnsupportedConfiguration
æD
æFi UMacAppUtilities
æT CONSTANT
æC The alert message displayed when the host machine does not have the
configuration necessary to run the application.
æKY phWhichDoc
æD
æFi UMacAppUtilities
æT CONSTANT
æC The dialog box used to specify the current print job when the application is
printing from the Finder.
æKY teJustSystem
æD
æFi UMacAppUtilities
æT CONSTANT
æC Indicates that methods accepting this constant as an argument are to use the
system justification set by the installed script. In Arabic and Hebrew systems,
this is typically right justification (but may be changed by the user). This
constant simply renames the constant teJustLeft; using the name teJustSystem
makes this issue more visible to the developer. If left justification is
required, you can use teForceLeft.
æKY Fields
æKL
TApplication.fCommandQueue
TApplication.fLastCommand
TApplication.fLaunchWithNewDocument
TApplication.fTicksOfLastIdle
TApplication.fTicksTilNextIdle
TAssociation.fEntries
TCellSelectCommand.fAnchorCell
TCellSelectCommand.fCmdKey
TCellSelectCommand.fDeselecting
TCellSelectCommand.fDifference
TCellSelectCommand.fGridView
TCellSelectCommand.fPrevCell
TCellSelectCommand.fPrevSelection
TCellSelectCommand.fShiftKey
TCellSelectCommand.fThisSelection
TClassListView.fInspectWindow
TCluster.fDataHandle
TCluster.fIndex
TCluster.fRsrcID
TCommand.fCanUndo
TCommand.fCausesChange
TCommand.fChangedDocument
TCommand.fChangesClipboard
TCommand.fCmdDone
TCommand.fCmdNumber
TCommand.fConstrainsMouse
TCommand.fFreeOnCompletion
TCommand.fInitialPt
TCommand.fPriority
TCommand.fReadyToExecute
TCommand.fRecurring
TCommand.fScroller
TCommand.fTrackNonMovement
TCommand.fTracksMouse
TCommand.fView
TCommand.fViewConstrain
TControl.fAdornment
TControl.fDefChoice
TControl.fDimmed
TControl.fDismissesDialog
TControl.fHilite
TControl.fInset
TControl.fPenSize
TControl.fSizeable
TControl.fTextStyle
TControlTracker.fControl
TCtlMgr.fBitsToShift
TCtlMgr.fCMgrControl
TCtlMgr.fLongMax
TCtlMgr.fLongMin
TCtlMgr.fLongVal
TDeskScrapView.fDataHandle
TDeskScrapView.fHavePicture
TDeskScrapView.fHaveText
TDeskScrapView.fScrapCount
TDialogTEView.fEditText
TDialogTEView.fScroller
TDialogView.fCancelItem
TDialogView.fCurrentEditText
TDialogView.fDefaultItem
TDialogView.fDismissed
TDialogView.fDismisser
TDialogView.fParamTxt
TDialogView.fTEView
TDocument.fChangeCount
TDocument.fCommitOnSave
TDocument.fCreator
TDocument.fDataOpen
TDocument.fDataPerm
TDocument.fDataRefNum
TDocument.fDocPrintHandler
TDocument.fFileType
TDocument.fModDate
TDocument.fPrintInfo
TDocument.fReopenAlert
TDocument.fRsrcOpen
TDocument.fRsrcPerm
TDocument.fRsrcRefNum
TDocument.fSaveExists
TDocument.fSaveInPlace
TDocument.fSavePrintInfo
TDocument.fSharePrintInfo
TDocument.fTitle
TDocument.fUsesDataFork
TDocument.fUsesRsrcFork
TDocument.fViewList
TDocument.fVolRefNum
TDocument.fWindowList
TDynamicArray.fAllocatedSize
TDynamicArray.fAllocationIncrement
TDynamicArray.fClassSize
TDynamicArray.fElementSize
TDynamicArray.fElementSizeShift
TDynamicArray.fFreeRequested
TDynamicArray.fSize
TEditText.fControlChars
TEditText.fMaxChars
TEditText.fTEView
TEntry.fKey
TEntry.fValue
TEvtHandler.fIdleFreq
TEvtHandler.fLastIdle
TEvtHandler.fNextHandler
TGridView.fAdornCols
TGridView.fAdornRows
TGridView.fColInset
TGridView.fColWidths
TGridView.fHLRegion
TGridView.fNumOfCols
TGridView.fNumOfRows
TGridView.fRowHeights
TGridView.fRowInset
TGridView.fSelections
TGridView.fSingleSelection
TGridView.fTempSelections
TIcon.fDataHandle
TIcon.fPreferColor
TIcon.fRsrcID
TInspector.fClassesByID
TInspector.fClassesByName
TInspector.fStaggerCount
TInspector.fWindowCount
TInspectWindow.fClassListView
TInspectWindow.fObjectView
TInspectWindow.fObjListView
TList.fObjClassID
TListView.fCurrentSelection
TListView.fItemHeight
TListView.fLineAscent
TListView.fNumberOfItems
TListView.fTextStyle
TNumberText.fMaximum
TNumberText.fMinimum
TObjectView.fInspectWindow
TObjectView.fLockState
TObjectView.fObject
TObjectView.fType
TObjListView.fInspectWindow
TObjListView.fObjectList
TPattern.fDataHandle
TPattern.fPreferColor
TPattern.fRsrcID
TPicture.fDataHandle
TPicture.fRsrcID
TPopup.fCurrentItem
TPopup.fItemOffset
TPopup.fMenuHandle
TPopup.fMenuID
TPopup.fRsrcID
TPrintCommand.fStdPrintHandler
TPrintHandler.fDeviceRes
TPrintHandler.fDocument
TPrintHandler.fFocusedPage
TPrintHandler.fView
TPrintHandler.fViewPerPage
TPrintStyleChangeCommand.fNewHPrint
TPrintStyleChangeCommand.fOldHPrint
TPrintStyleChangeCommand.fStdPrintHandler
TPtrBasedDoublyLinkedList.fHeadNodePtr
TPtrBasedDoublyLinkedList.fTailNodePtr
TRunArray.fChunks
TRunArray.fLastChunk
TRunArray.fLastIndex
TRunArray.fLastItem
TRunArray.fLastTotal
TRunArray.fNoOfChunks
TRunArray.fNoOfItems
TRunArray.fTotal
TScrollBar.fBitsToShift
TScrollBar.fDirection
TScrollBar.fLongMax
TScrollBar.fLongMin
TScrollBar.fLongVal
TScroller.fConstrain
TScroller.fMaxTranslation
TScroller.fRespondsToFunctionKeys
TScroller.fSBarOffsets
TScroller.fScrollBars
TScroller.fScrollLimit
TScroller.fScrollUnit
TScroller.fTranslation
TSScrollBar.fScrollers
TStaticText.fAutoWrap
TStaticText.fDataHandle
TStaticText.fIndex
TStaticText.fJust
TStaticText.fRsrcID
TStdPrintHandler.fFinderJobDialog
TStdPrintHandler.fFinderSetup
TStdPrintHandler.fFixedSizePages
TStdPrintHandler.fHPrint
TStdPrintHandler.fLastBreak
TStdPrintHandler.fLastCheckedPrinter
TStdPrintHandler.fLastPrinterName
TStdPrintHandler.fLastStrip
TStdPrintHandler.fMarginRes
TStdPrintHandler.fMinimalMargins
TStdPrintHandler.fPageAreas
TStdPrintHandler.fPageDirection
TStdPrintHandler.fPageStrips
TStdPrintHandler.fPPrPort
TStdPrintHandler.fPrintDialog
TStdPrintHandler.fPrinterDev
TStdPrintHandler.fPrintExtent
TStdPrintHandler.fShowBreaks
TStdPrintHandler.fSquareDots
TStdPrintHandler.fStartPage
TStdPrintHandler.fViewedRect
TTECommand.fHTE
TTECommand.fNewEnd
TTECommand.fNewStart
TTECommand.fNewStyles
TTECommand.fNewText
TTECommand.fOldEnd
TTECommand.fOldStart
TTECommand.fOldStyles
TTECommand.fOldText
TTECommand.fPadding
TTECommand.fStylePad
TTECommand.fTEView
TTECommand.fTextPad
TTECutCopyCommand.fClipCreated
TTEStyleCommand.fMode
TTEStyleCommand.fNewTextStyle
TTEStyleCommand.fOldTextStyle
TTETypingCommand.fCompleted
TTETypingCommand.fFirstChar
TTEView.fAcceptsChanges
TTEView.fAutoWrap
TTEView.fControlChars
TTEView.fFreeText
TTEView.fHTE
TTEView.fInset
TTEView.fJustification
TTEView.fKeyCmdNumber
TTEView.fLastHeight
TTEView.fLastLine
TTEView.fLastPageBreak
TTEView.fLastWidth
TTEView.fMaxChars
TTEView.fMinAhead
TTEView.fSavedTEHandle
TTEView.fSpecsChanged
TTEView.fStyleType
TTEView.fText
TTEView.fTextStyle
TTEView.fTypingCommand
TTextGridView.fLineAscent
TTextGridView.fLineHeight
TTextGridView.fTextStyle
TTranscriptView.fCols
TTranscriptView.fFirstLineIndex
TTranscriptView.fFontHeight
TTranscriptView.fFontInfo
TTranscriptView.fForcePtr
TTranscriptView.fForceStack
TTranscriptView.fGotRefnum
TTranscriptView.fHelpProc
TTranscriptView.fInsertionPointOn
TTranscriptView.fInsertionPt
TTranscriptView.fLastCh
TTranscriptView.fLastInsertionPointTime
TTranscriptView.fLineLengths
TTranscriptView.fLineStarts
TTranscriptView.fRefnum
TTranscriptView.fRows
TTranscriptView.fText
TTranscriptView.fTextStyle
TTranscriptView.fTotal
TTranscriptView.fUpdateRgn
TTranscriptView.fVRefNum
TTranscriptView.fWrToFile
TTranscriptView.fWrToWindow
TView.fDocument
TView.fFocusRec
TView.fHLDesired
TView.fIdentifier
TView.fLocation
TView.fPrintHandler
TView.fShown
TView.fSize
TView.fSizeDeterminer
TView.fSubViews
TView.fSuperView
TView.fViewEnabled
TWindow.fAdapted
TWindow.fClosesDocument
TWindow.fConstTitle
TWindow.fContDifference
TWindow.fContRgnInset
TWindow.fDisposeOnFree
TWindow.fDoFirstClick
TWindow.fFloats
TWindow.fForcedOnScreen
TWindow.fFreeOnClosing
TWindow.fHorzCentered
TWindow.fIsActive
TWindow.fIsClosable
TWindow.fIsModal
TWindow.fIsResizable
TWindow.fMoveBounds
TWindow.fMustAdapt
TWindow.fMustForceOnScreen
TWindow.fMustHorzCenter
TWindow.fMustStagger
TWindow.fMustVertCenter
TWindow.fOpenInitially
TWindow.fPreDocname
TWindow.fProcId
TWindow.fResizeLimits
TWindow.fStaggered
TWindow.fTarget
TWindow.fTargetId
TWindow.fVertCentered
TWindow.fWMgrWindow
æKY TApplication.fCommandQueue
æD fCommandQueue: TCommandList;
æFi UMacApp.p
æT FIELD
æC The queue of commands that were posted for execution.
æKY TApplication.fLastCommand
æD fLastCommand: TCommand;
æFi UMacApp.p
æT FIELD
æC The last command done or undone by the user.
æKY TApplication.fLaunchWithNewDocument
æD fLaunchWithNewDocument: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC A value of TRUE (the default) specifies that a new untitled document is to be
created when the application is launched without a document.
æKY TApplication.fTicksOfLastIdle
æD fTicksOfLastIdle: LONGINT;
æFi UMacApp.p
æT FIELD
æC The time, in ticks, when the active chain and cohandlers were last idled.
æKY TApplication.fTicksTilNextIdle
æD fTicksTilNextIdle: LONGINT;
æFi UMacApp.p
æT FIELD
æC The computed number of ticks until the next time TApplication.Idle needs to be
called. The field also represents the maximum number of waitTicks that can be
passed to TApplication.GetEvent.
æKY TAssociation.fEntries
æD fEntries: TEntriesList;
æFi UAssociation.p
æT FIELD
æC The items in a TEntriesList list.
æKY TCellSelectCommand.fAnchorCell
æD fAnchorCell: GridCell;
æFi UGridView.p
æT FIELD
æC The first cell in a selection.
æKY TCellSelectCommand.fCmdKey
æD fCmdKey: BOOLEAN;
æFi UGridView.p
æT FIELD
æC TRUE if the Command key is currently pressed.
æKY TCellSelectCommand.fDeselecting
æD fDeselecting: BOOLEAN;
æFi UGridView.p
æT FIELD
æC TRUE if one or more cells are to be excluded from the selection.
æKY TCellSelectCommand.fDifference
æD fDifference: RgnHandle;
æFi UGridView.p
æT FIELD
æC The region to be excluded from the selection when the value of fDeselecting is
TRUE.
æKY TCellSelectCommand.fGridView
æD fGridView: TGridView;
æFi UGridView.p
æT FIELD
æC The associated TGridView object.
æKY TCellSelectCommand.fPrevCell
æD fPrevCell: GridCell;
æFi UGridView.p
æT FIELD
æC The cell selected prior to the current selection.
æKY TCellSelectCommand.fPrevSelection
æD fPrevSelection: RgnHandle;
æFi UGridView.p
æT FIELD
æC A handle to the region that defines the selection made prior to the current
selection.
æKY TCellSelectCommand.fShiftKey
æD fShiftKey: BOOLEAN;
æFi UGridView.p
æT FIELD
æC TRUE if the Shift key is currently pressed.
æKY TCellSelectCommand.fThisSelection
æD fThisSelection: RgnHandle;
æFi UGridView.p
æT FIELD
æC A handle to the region that defines the current selection. The value of the
fThisSelection field may be the union of fPrevSelection and a new selection, the
difference between the two, or simply the new selection.
æKY TClassListView.fInspectWindow
æD fInspectWindow: TInspectWindow;
æFm UInspector.inc1.p
æT FIELD
æC The Window Manager window in which the MacApp Inspector appears.
æKY TCluster.fDataHandle
æD fDataHandle: StringHandle;
æFi UDialog.p
æT FIELD
æC The handle to the string list containing labels for the cluster.
æKY TCluster.fIndex
æD fIndex: INTEGER;
æFi UDialog.p
æT FIELD
æC The index specifying which position in the string list the specified label
occupies.
æKY TCluster.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The resource ID of the string list.
æKY TCommand.fCanUndo
æD fCanUndo: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if this command can be undone. The default value is TRUE.
æKY TCommand.fCausesChange
æD fCausesChange: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if this command changes the document referenced by the command’s
fChangedDocument field. The default value is TRUE. When fCausesChange has the value TRUE,
the document is automatically marked as changed when the command is done. If
the command is undone, the document’s change count is automatically decremented;
if the command is redone, the change count is incremented again.
æKY TCommand.fChangedDocument
æD fChangedDocument: TDocument;
æFi UMacApp.p
æT FIELD
æC The document that may be changed by the command.
æKY TCommand.fChangesClipboard
æD fChangesClipboard: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the command changes the Clipboard. The default value is FALSE; you
should set it to TRUE for Cut or Copy commands that change the Clipboard.
æKY TCommand.fCmdDone
æD fCmdDone: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the last "execution" message sent to the command was a DoIt or RedoIt
method.
æKY TCommand.fCmdNumber
æD fCmdNumber: CmdNumber;
æFi UMacApp.p
æT FIELD
æC The command number associated with a particular menu command.
æKY TCommand.fConstrainsMouse
æD fConstrainsMouse: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that MacApp calls this command’s TrackConstrain method while the
mouse moves. The default value is FALSE.
æKY TCommand.fFreeOnCompletion
æD fFreeOnCompletion:BOOLEAN;
æFi UMacApp.p
æT FIELD
æC A value of TRUE causes a command to be freed when it is completed (the default).
The command is considered complete after the DoIt method is executed for
commands that cannot be undone and after the Commit method is executed for commands
that can be undone.
æKY TCommand.fInitialPt
æD fInitialPt: Point;
æFi UMacApp.p
æT FIELD
æC The point from which to track (usually the point at which the mouse button was
pressed) in global coordinates. MacApp sets this field in
TApplication.HandleMouseDown; you set it if you create trackers that are not passed back through that
call chain.
æKY TCommand.fPriority
æD fPriority: CommandPriority;
æFi UMacApp.p
æT FIELD
æC Defines how the command should be prioritized if it has to compete on a
prioritized basis for execution. The default is kNormalPriority. You usually do not
have to set the value of this field.
æKY TCommand.fReadyToExecute
æD fReadyToExecute: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE (the default) enables this command to be returned from any queues in which
it may be stored. You usually do not have to set this field.
æKY TCommand.fRecurring
æD fRecurring: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC FALSE (the default) enables this command to be removed from any command queue in
which it may be stored, because the command is to be executed only once.
æKY TCommand.fScroller
æD fScroller: TScroller;
æFi UMacApp.p
æT FIELD
æC A handle to the scroller used for automatic scrolling. If no scroller is
associated with the view, the value of fScroller is NIL. To disable automatic
scrolling, set the value of fScroller to NIL.
æKY TCommand.fTrackNonMovement
æD fTrackNonMovement: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC When the value of this field is TRUE, MacApp calls TrackMouse even if the mouse
hasn’t moved since the previous call to TrackMouse. The default value is FALSE.
æKY TCommand.fTracksMouse
æD fTracksMouse: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the command should be tracked.
æKY TCommand.fView
æD fView: TView;
æFi UMacApp.p
æT FIELD
æC The view in which mouse tracking takes place; set to NIL if you want to track
the mouse in global coordinates rather than view coordinates.
æKY TCommand.fViewConstrain
æD fViewConstrain: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the mouse is constrained to the view. The default value is TRUE.
æKY TControl.fAdornment
æD fAdornment: CntlAdornment;
æFi UMacApp.p
æT FIELD
æC The type of adornment for the control. Possible values are adnShadow, which
shadows the control; adnOval, which frames the control with an oval; adnRRect,
which frames the control with a rounded rectangle; adnLineTop, which draws a line
above the control; adnLineLeft, which draws a line to the left of the control;
adnLine Bottom, which draws a line below the control; and adnLineRight, which
draws a line to the right of the control. The default value of fAdornment is NIL,
which means the control has no adornment.
æKY TControl.fDefChoice
æD fDefChoice: INTEGER;
æFi UMacApp.p
æT FIELD
æC The code that is passed to TControl.DoChoice. The default value is the constant
mOKHit.
æKY TControl.fDimmed
æD fDimmed: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the control is dimmed. The default value is FALSE.
æKY TControl.fDismissesDialog
æD fDismissesDialog: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if clicking this control dismisses a dialog box. The default value is
FALSE.
æKY TControl.fHilite
æD fHilite: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the control is highlighted. The default value is FALSE.
æKY TControl.fInset
æD fInset: Rect;
æFi UMacApp.p
æT FIELD
æC Defines which part of the view is the control's active area. The active control
area is determined by insetting the view’s dimensions by fInset. Generally,
controls respond to mouse clicks only in the active area, and adornments are drawn
in the inactive area. The default inset is (0,0,0,0).
æKY TControl.fPenSize
æD fPenSize: Point;
æFi UMacApp.p
æT FIELD
æC The pen size used to draw the control’s adornment. The default value is (1,1).
æKY TControl.fSizeable
æD fSizeable: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the control's active area changes in proportion to the
view’s size; FALSE indicates that the size of the control's active area is fixed. If
the value of this field is FALSE, changing the view's size simply changes the
bottom and right insets from the view’s size to the control’s size. The default
value is TRUE.
æKY TControl.fTextStyle
æD fTextStyle: TextStyle;
æFi UMacApp.p
æT FIELD
æC The font, style, size, and color of the text used to draw the control’s label.
The default value is the system font and plain text style.
æKY TControlTracker.fControl
æD fControl: TControl;
æFi UMacApp.p
æT FIELD
æC The control for which the mouse is being tracked.
æKY TCtlMgr.fBitsToShift
æD fBitsToShift: INTEGER;
æFi UMacApp.p
æT FIELD
æC The number of bits to shift to convert the control’s long values into Control
Manager control values.
æKY TCtlMgr.fCMgrControl
æD fCMgrControl: ControlHandle;
æFi UMacApp.p
æT FIELD
æC The Control Manager control that the view represents.
æKY TCtlMgr.fLongMax
æD fLongMax: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The control’s maximum value in VCoordinate units.
æKY TCtlMgr.fLongMin
æD fLongMin: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The control’s minimum value in VCoordinate units. The default value is 0.
æKY TCtlMgr.fLongVal
æD fLongVal: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The control’s current value in VCoordinate units.
æKY TDeskScrapView.fDataHandle
æD fDataHandle: Handle;
æFi UMacApp.p
æT FIELD
æC The handle to the desk scrap.
æKY TDeskScrapView.fHavePicture
æD fHavePicture: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the data in the desk scrap is of type 'PICT'.
æKY TDeskScrapView.fHaveText
æD fHaveText: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the desk scrap is of type 'TEXT'.
æKY TDeskScrapView.fScrapCount
æD fScrapCount: INTEGER;
æFi UMacApp.p
æT FIELD
æC The scrap count of the scrap represented by the view. MacApp uses fScrapCount to
determine whether the contents of the desk scrap have changed.
æKY TDialogTEView.fEditText
æD fEditText: TEditText;
æFi UDialog.p
æT FIELD
æC The associated TEditText object.
æKY TDialogTEView.fScroller
æD fScroller: TScroller;
æFi UDialog.p
æT FIELD
æC A reference to the scroller in which the TDialogTEView object is contained; used
to make mouse-tracking and automatic scrolling easier.
æKY TDialogView.fCancelItem
æD fCancelItem: IDType;
æFi UDialog.p
æT FIELD
æC The identifier of the Cancel item.
æKY TDialogView.fCurrentEditText
æD fCurrentEditText: TEditText;
æFi UDialog.p
æT FIELD
æC The currently selected TEditText item.
æKY TDialogView.fDefaultItem
æD fDefaultItem: IDType;
æFi UDialog.p
æT FIELD
æC The identifier of the default item.
æKY TDialogView.fDismissed
æD fDismissed: BOOLEAN;
æFi UDialog.p
æT FIELD
æC TRUE if the dialog box has been dismissed.
æKY TDialogView.fDismisser
æD fDismisser: IDType;
æFi UDialog.p
æT FIELD
æC The identifier of the view in which the message dismissing the dialog box
originated.
æKY TDialogView.fParamTxt
æD fParamTxt: TAssociation;
æFi UDialog.p
æT FIELD
æC The TEntry list of strings that replace parameters in dialog boxes.
æKY TDialogView.fTEView
æD fTEView: TDialogTEView;
æFi UDialog.p
æT FIELD
æC The subview in which text editing actually takes place in TEditText views.
æKY TDocument.fChangeCount
æD fChangeCount: LONGINT;
æFi UMacApp.p
æT FIELD
æC The number of changes that occurred since the last time the document was saved.
You can use TDocument.SetChangeCount to set this value.
æKY TDocument.fCommitOnSave
æD fCommitOnSave: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set fCommitOnSave to TRUE if the last command affects the document and is to be
committed when saving the document. The default value is TRUE.
æKY TDocument.fCreator
æD fCreator: OSType;
æFi UMacApp.p
æT FIELD
æC A four-character code that specifies the application that created the document;
you specify its default value as an argument to the method TDocument.IDocument.
æKY TDocument.fDataOpen
æD fDataOpen: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the document file's data fork must be kept open at all times. The value
of fDataOpen is TRUE only for disk-based documents. You specify this field's
default value as an argument to the method TDocument.IDocument.
æKY TDocument.fDataPerm
æD fDataPerm: INTEGER;
æFi UMacApp.p
æT FIELD
æC The permission used to open the file's data fork. Possible values are fsRdPerm
(read-only permission, the default), fsWrPerm (write-only permission),
fsRdWrPerm (read and write permission), and fsRdWrShPerm (shared permission).
æKY TDocument.fDataRefNum
æD fDataRefNum: INTEGER;
æFi UMacApp.p
æT FIELD
æC The reference number for the document file's open data fork. This field is valid
only if the value of the fDataOpen field is TRUE.
æKY TDocument.fDocPrintHandler
æD fDocPrintHandler: TPrintHandler;
æFi UMacApp.p
æT FIELD
æC The object that enables and executes the Print, Print One, and Page Setup
commands.
æKY TDocument.fFileType
æD fFileType: OSType;
æFi UMacApp.p
æT FIELD
æC The four-character code that specifies the document's file type; you specify its
default value as an argument to the method TDocument.IDocument.
æKY TDocument.fModDate
æD fModDate: LONGINT;
æFi UMacApp.p
æT FIELD
æC The file modification date specifying when the file was last read or saved; the
default value in newly-initialized TDocument objects is 0.
æKY TDocument.fPrintInfo
æD fPrintInfo: Handle;
æFi UMacApp.p
æT FIELD
æC A handle to a 120-byte print information record. The handle is allocated by
TDocument.DoRead if an existing document is being opened, or by IStdPrintHandler if
a new document is being created. If there is no print information record, set
fPrintInfo to NIL; McApp does this for you when creating a new document and
when freeing a document.
æKY TDocument.fReopenAlert
æD fReopenAlert: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set the value of fReopenAlert to TRUE if you want an alert box to appear when
the user attempts to reopen a document. The default value is TRUE.
æKY TDocument.fRsrcOpen
æD fRsrcOpen: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the document file's resource fork must be kept open at all times. You
specify this field's default value as an argument to the method
TDocument.IDocument.
æKY TDocument.fRsrcPerm
æD fRsrcPerm: INTEGER;
æFi UMacApp.p
æT FIELD
æC The permission used to open the file's resource fork. Possible values of
fRsrcPerm are fsRdPerm (read-only permission, the default), fsWrPerm (write-only
permission), fsRdWrPerm (read and write permission), and fsRdWrShPerm (shared
permission).
æKY TDocument.fRsrcRefNum
æD fRsrcRefNum: INTEGER;
æFi UMacApp.p
æT FIELD
æC The reference number for the document file's open resource fork. This field is
valid only if the value of the fRsrcOpen field is TRUE.
æKY TDocument.fSaveExists
æD fSaveExists: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if a disk file representing this document exists; in other words, TRUE if
this document has ever been saved on disk.
æKY TDocument.fSaveInPlace
æD fSaveInPlace: SIPChoice;
æFi UMacApp.p
æT FIELD
æC The value that determines what happens when there isn’t room on the disk to save
the document in a new file. Possible values of fSaveInPlace are sipNever (the
original file should never be overwritten; the default), sipAlways (the
original file should always be overwritten when there is not enough space to save a
copy), and sipAskUser (the user should be asked whether or not the original file
should be overwritten when there is not enough space to save a copy).
æKY TDocument.fSavePrintInfo
æD fSavePrintInfo: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want TDocument.DoWrite to write the fDocPrintHandler's print
information record to the data fork of the document file when the document is
saved. TRUE also indicates that TDocument.DoRead reads this record when the
document is read. The default is FALSE.
æKY TDocument.fSharePrintInfo
æD fSharePrintInfo: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want all print handlers associated with this document's views
to share the same print information record. The default is TRUE.
æKY TDocument.fTitle
æD fTitle: StringHandle;
æFi UMacApp.p
æT FIELD
æC The name of the document file.
æKY TDocument.fUsesDataFork
æD fUsesDataFork: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the document uses the file's data fork. You specify this field's default
value as an argument to the method TDocument.IDocument.
æKY TDocument.fUsesRsrcFork
æD fUsesRsrcFork: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the document uses the file's resource fork. You specify this field's
default value as an argument to the method TDocument.IDocument.
æKY TDocument.fViewList
æD fViewList: TList;
æFi UMacApp.p
æT FIELD
æC The list of views that render this document’s data.
æKY TDocument.fVolRefNum
æD fVolRefNum: INTEGER;
æFi UMacApp.p
æT FIELD
æC The document file's volume reference number.
æKY TDocument.fWindowList
æD fWindowList: TList;
æFi UMacApp.p
æT FIELD
æC The list of windows associated with the document.
æKY TDynamicArray.fAllocatedSize
æD fAllocatedSize: ArrayIndex;
æFi UList.p
æT FIELD
æC The number of elements for which storage is allocated.
æKY TDynamicArray.fAllocationIncrement
æD fAllocationIncrement: ArrayIndex;
æFi UList.p
æT FIELD
æC The number of elements by which to increase or decrease the allocated size of
the array when it needs to grow or shrink. Its default value is
kAllocationIncrement (in MacApp 2.0, the value of this constant is 6); you can change the
default allocation increment by overriding TDyanamicArray.IDynamicArray.
æKY TDynamicArray.fClassSize
æD fClassSize: Size;
æFi UList.p
æT FIELD
æC The size of the non-dynamic part of a TDynamicArray array; used by
ComputeAddress to create a pointer to an element.
æKY TDynamicArray.fElementSize
æD fElementSize: INTEGER;
æFi UList.p
æT FIELD
æC The size in bytes of an element. This must be a power of 2 (1, 2, 4, 8, 16, and
so on) when inserting or deleting more than one element at a time; odd-size
elements are supported only for single-element insertions or deletions.
æKY TDynamicArray.fElementSizeShift
æD fElementSizeShift: INTEGER;
æFi UList.p
æT FIELD
æC The power of 2 for the element size. This is used to avoid using DIV and MUL.
æKY TDynamicArray.fFreeRequested
æD fFreeRequested: BOOLEAN;
æFi UList.p
æT FIELD
æC TRUE if the Free method was called but couldn’t be honored because enumeration
was in process. MacApp checks this field when it completes the enumeration and
calls the Free method if the value of fFreeRequested is TRUE.
æKY TDynamicArray.fSize
æD fSize: ArrayIndex;
æFi UList.p
æT FIELD
æC The number of elements actually in the array, from 0 to the limit of memory.
æKY TEditText.fControlChars
æD fControlChars: ControlCharSet;
æFi UDialog.p
æT FIELD
æC Control characters that are allowed and not passed to the next handler for
editing.
æKY TEditText.fMaxChars
æD fMaxChars: INTEGER;
æFi UDialog.p
æT FIELD
æC The maximum number of characters to accept.
æKY TEditText.fTEView
æD fTEView: TDialogTEView;
æFi UDialog.p
æT FIELD
æC Used for the view in which editing actually takes place.
æKY TEntry.fKey
æD fKey: StringHandle;
æFi UAssociation.p
æT FIELD
æC A handle to the key associated with a particular string.
æKY TEntry.fValue
æD fValue: StringHandle;
æFi UAssociation.p
æT FIELD
æC A handle to the string associated with a particular key.
æKY TEvtHandler.fIdleFreq
æD fIdleFreq: LONGINT;
æFi UMacApp.p
æT FIELD
æC The minimum number of ticks that can elapse before MacApp calls the DoIdle
method of the object. When the value of fIdleFreq is 0, MacApp calls the DoIdle
method as often as possible. If the field is set to kMaxIdleTime (the default),
DoIdle is never called.
æKY TEvtHandler.fLastIdle
æD fLastIdle: LONGINT;
æFi UMacApp.p
æT FIELD
æC The tick count at the time a DoIdle method was last called.
æKY TEvtHandler.fNextHandler
æD fNextHandler: TEvtHandler;
æFi UMacApp.p
æT FIELD
æC The next event handler in the event handler chain, or NIL if there isn't one.
æKY TGridView.fAdornCols
æD fAdornCols: BOOLEAN;
æFi UGridView.p
æT FIELD
æC Set to TRUE if you want to draw adornments for columns.
æKY TGridView.fAdornRows
æD fAdornRows: BOOLEAN;
æFi UGridView.p
æT FIELD
æC Set to TRUE if you want to draw adornments for rows.
æKY TGridView.fColInset
æD fColInset: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of pixels between columns of cells.
æKY TGridView.fColWidths
æD fColWidths: TRunArray;
æFi UGridView.p
æT FIELD
æC A dynamic array containing column widths.
æKY TGridView.fHLRegion
æD fHLRegion: RgnHandle;
æFi UGridView.p
æT FIELD
æC The region of cells to be highlighted. This will be different from fSelections
while selection with the mouse is taking place.
æKY TGridView.fNumOfCols
æD fNumOfCols: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of columns in the grid.
æKY TGridView.fNumOfRows
æD fNumOfRows: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of rows in the grid.
æKY TGridView.fRowHeights
æD fRowHeights: TRunArray;
æFi UGridView.p
æT FIELD
æC A dynamic array containing row heights.
æKY TGridView.fRowInset
æD fRowInset: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of pixels between rows of cells.
æKY TGridView.fSelections
æD fSelections: RgnHandle;
æFi UGridView.p
æT FIELD
æC The region containing the currently selected cells.
æKY TGridView.fSingleSelection
æD fSingleSelection: BOOLEAN;
æFi UGridView.p
æT FIELD
æC Set to TRUE if you want to limit selections to only one cell at a time.
æKY TGridView.fTempSelections
æD fTempSelections: RgnHandle;
æFi UGridView.p
æT FIELD
æC Used internally by TGridView.SetSelectionRect.
æKY TIcon.fDataHandle
æD fDataHandle: Handle;
æFi UDialog.p
æT FIELD
æC The handle to the icon data.
æKY TIcon.fPreferColor
æD fPreferColor: BOOLEAN;
æFi UDialog.p
æT FIELD
æC TRUE if 'cicn' resources should be checked before 'ICON' resources.
æKY TIcon.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The resource ID of the icon.
æKY TInspector.fClassesByID
æD fClassesByID: TClassesByID;
æFm UInspector.inc1.p
æT FIELD
æC The list of classes sorted by ID number.
æKY TInspector.fClassesByName
æD fClassesByName: TClassesByName;
æFm UInspector.inc1.p
æT FIELD
æC The list of classes sorted by name.
æKY TInspector.fStaggerCount
æD fStaggerCount: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC When staggering windows, fStaggerCount is used to compute the amount by which
each window's location is offset from the previous one.
æKY TInspector.fWindowCount
æD fWindowCount: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The number of open windows.
æKY TInspectWindow.fClassListView
æD fClassListView: TClassListView;
æFm UInspector.inc1.p
æT FIELD
æC The view that displays the list of classes in an Inspector window.
æKY TInspectWindow.fObjectView
æD fObjectView: TObjectView;
æFm UInspector.inc1.p
æT FIELD
æC The view that displays a list of fields in an Inspector window.
æKY TInspectWindow.fObjListView
æD fObjListView: TObjListView;
æFm UInspector.inc1.p
æT FIELD
æC The view that displays the list of objects in an Inspector window.
æKY TList.fObjClassID
æD fObjClassID: ObjClassID;
æFi UList.p
æT FIELD
æC The identifier of the type of objects in the list.
æKY TListView.fCurrentSelection
æD fCurrentSelection: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The index of the current selection; if there is no selection, the value of this
field is 0.
æKY TListView.fItemHeight
æD fItemHeight: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The height of each item, including leading.
æKY TListView.fLineAscent
æD fLineAscent: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The position of the text's baseline relative to the top of the line.
æKY TListView.fNumberOfItems
æD fNumberOfItems: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The number of items currently in the list.
æKY TListView.fTextStyle
æD fTextStyle: TextStyle;
æFm UInspector.inc1.p
æT FIELD
æC The text style (color, size, and font).
æKY TNumberText.fMaximum
æD fMaximum: LONGINT;
æFi UDialog.p
æT FIELD
æC The maximum value allowed in the view.
æKY TNumberText.fMinimum
æD fMinimum: LONGINT;
æFi UDialog.p
æT FIELD
æC The minimum value allowed in the view.
æKY TObjectView.fInspectWindow
æD fInspectWindow: TInspectWindow;
æFm UInspector.inc1.p
æT FIELD
æC The Window Manager window in which the MacApp Inspector appears.
æKY TObjectView.fLockState
æD fLockState: BOOLEAN;
æFm UInspector.inc1.p
æT FIELD
æC Set to TRUE if you want to lock an object's handle.
æKY TObjectView.fObject
æD fObject: TObject;
æFm UInspector.inc1.p
æT FIELD
æC A reference to the instance of class TObject that is being displayed in the
Inspector window.
æKY TObjectView.fType
æD fType: INTEGER;
æFm UInspector.inc1.p
æT FIELD
æC The type of information being inspected. Possible values are bObject (the item
is an object), bGrafPtr (the item is a pointer to a grafPort), bWindowPointer
(the item is a pointer to a window), bControlHandle (the item is a handle to a
TControl object), bRgnHandle (the item is a handle to a region), and bTEHandle
(the item is a handle to a TEditText object).
æKY TObjListView.fInspectWindow
æD fInspectWindow: TInspectWindow;
æFm UInspector.inc1.p
æT FIELD
æC The Window Manager window in which the MacApp Inspector appears.
æKY TObjListView.fObjectList
æD fObjectList: TObjectList;
æFm UInspector.inc1.p
æT FIELD
æC An instance of TObjectList used by the Inspector.
æKY TPattern.fDataHandle
æD fDataHandle: Handle;
æFi UDialog.p
æT FIELD
æC The handle to the pattern data.
æKY TPattern.fPreferColor
æD fPreferColor: BOOLEAN;
æFi UDialog.p
æT FIELD
æC TRUE if 'ppat' resources should be checked before 'PAT ' resources.
æKY TPattern.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The resource ID of the pattern.
æKY TPicture.fDataHandle
æD fDataHandle: PicHandle;
æFi UDialog.p
æT FIELD
æC The handle to the picture data.
æKY TPicture.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The picture's resource ID.
æKY TPopup.fCurrentItem
æD fCurrentItem: INTEGER;
æFi UDialog.p
æT FIELD
æC The currently selected menu item.
æKY TPopup.fItemOffset
æD fItemOffset: INTEGER;
æFi UDialog.p
æT FIELD
æC The offset from the left edge of the extent to the left edge of the pop-up
selector.
æKY TPopup.fMenuHandle
æD fMenuHandle: MenuHandle;
æFi UDialog.p
æT FIELD
æC The handle to a pop-up menu.
æKY TPopup.fMenuID
æD fMenuID: INTEGER;
æFi UDialog.p
æT FIELD
æC The menu ID of the pop-up menu.
æKY TPopup.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The resource ID of the 'MENU' resource.
æKY TPrintCommand.fStdPrintHandler
æD fStdPrintHandler: TStdPrintHandler;
æFi UPrinting.p
æT FIELD
æC The associated print handler.
æKY TPrintHandler.fDeviceRes
æD fDeviceRes: Point;
æFi UMacApp.p
æT FIELD
æC The resolution of the selected printer, expressed in dots per inch.
æKY TPrintHandler.fDocument
æD fDocument: TDocument;
æFi UMacApp.p
æT FIELD
æC The document printed by this handler.
æKY TPrintHandler.fFocusedPage
æD fFocusedPage: INTEGER;
æFi UMacApp.p
æT FIELD
æC The page number of the currently focused page during printing.
æKY TPrintHandler.fView
æD fView: TView;
æFi UMacApp.p
æT FIELD
æC The view whose image the print handler prints.
æKY TPrintHandler.fViewPerPage
æD fViewPerPage: VPoint;
æFi UMacApp.p
æT FIELD
æC The default page-strip size.
æKY TPrintStyleChangeCommand.fNewHPrint
æD fNewHPrint: Handle;
æFi UPrinting.p
æT FIELD
æC A handle to the new print record.
æKY TPrintStyleChangeCommand.fOldHPrint
æD fOldHPrint: Handle;
æFi UPrinting.p
æT FIELD
æC A handle to the old print record.
æKY TPrintStyleChangeCommand.fStdPrintHandler
æD fStdPrintHandler:TStdPrintHandler;
æFi UPrinting.p
æT FIELD
æC The print handler associated with this command.
æKY TPtrBasedDoublyLinkedList.fHeadNodePtr
æD fHeadNodePtr: PtrBasedDoublyLinkedListNodePtr;
æFi UList.p
æT FIELD
æC The head, or first, pointer of the linked list.
æKY TPtrBasedDoublyLinkedList.fTailNodePtr
æD fTailNodePtr: PtrBasedDoublyLinkedListNodePtr;
æFi UList.p
æT FIELD
æC The tail, or last, pointer of the linked list.
æKY TRunArray.fChunks
æD fChunks: ChunkArrayHandle;
æFi UGridView.p
æT FIELD
æC A handle to the "chunks" in a run array. A "chunk" is two or more consecutive
items in the array that have the same value.
æKY TRunArray.fLastChunk
æD fLastChunk: INTEGER;
æFi UGridView.p
æT FIELD
æC The last "chunk" found.
æKY TRunArray.fLastIndex
æD fLastIndex: INTEGER;
æFi UGridView.p
æT FIELD
æC The last index used.
æKY TRunArray.fLastItem
æD fLastItem: INTEGER;
æFi UGridView.p
æT FIELD
æC The last item found.
æKY TRunArray.fLastTotal
æD fLastTotal: LONGINT;
æFi UGridView.p
æT FIELD
æC The last total calculated.
æKY TRunArray.fNoOfChunks
æD fNoOfChunks: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of "chunks" in the run array.
æKY TRunArray.fNoOfItems
æD fNoOfItems: INTEGER;
æFi UGridView.p
æT FIELD
æC The number of items (values) in this run array.
æKY TRunArray.fTotal
æD fTotal: LONGINT;
æFi UGridView.p
æT FIELD
æC The sum of the values in the run array.
æKY TScrollBar.fBitsToShift
æD fBitsToShift: INTEGER;
æFi UMacApp.p
æT FIELD
æC The number of bits to shift in order to convert the scroll bar’s long values
into Control Manager control values.
æKY TScrollBar.fDirection
æD fDirection: VHSelect;
æFi UMacApp.p
æT FIELD
æC The scroll bar’s direction (horizontal or vertical).
æKY TScrollBar.fLongMax
æD fLongMax: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The scroll bar’s maximum value in VCoordinate units.
æKY TScrollBar.fLongMin
æD fLongMin: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The scroll bar’s minimum value in VCoordinate units. The default value is zero.
æKY TScrollBar.fLongVal
æD fLongVal: VCoordinate;
æFi UMacApp.p
æT FIELD
æC The scroll bar’s current value in VCoordinate units.
æKY TScroller.fConstrain
æD fConstrain: ARRAY [VHSelect] OF BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Indicates TRUE if the translation values should be constrained to even multiples
of fScrollUnits in either the horizontal or vertical direction.
æKY TScroller.fMaxTranslation
æD fMaxTranslation: VPoint;
æFi UMacApp.p
æT FIELD
æC The maximum values that fTranslation can accept. The value of fMaxTranslation is
computed by subtracting the scroller’s size from the value of fScrollLimit.
æKY TScroller.fRespondsToFunctionKeys
æD fRespondsToFunctionKeys: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the scroller object responds to the Page Up, Page Down, Home, or End
keys.
æKY TScroller.fSBarOffsets
æD fSBarOffsets: VRect;
æFi UMacApp.p
æT FIELD
æC Used to determine how to resize the associated scroll bars. The fSBarOffsets.top
and fSBarOffsets.bottom fields indicate where the top and bottom of the
vertical scroll bar are in relation to the top and bottom of the scroller. The
fSBarOffsets.left and fSBarOffsets.right fields indicate where the left and right
offsets of the horizontal scroll bar are in relation to the left and right offsets
of the scroller.
æKY TScroller.fScrollBars
æD fScrollBars: ARRAY [VHSelect] OF TSScrollBar;
æFi UMacApp.p
æT FIELD
æC A reference to the horizontal and vertical scroll bars; set fScrollBars to NIL
if they don't exist.
æKY TScroller.fScrollLimit
æD fScrollLimit: VPoint;
æFi UMacApp.p
æT FIELD
æC The point of the view past which scrolling cannot take place.
æKY TScroller.fScrollUnit
æD fScrollUnit: Point;
æFi UMacApp.p
æT FIELD
æC The amount of change, either horizontal or vertical, to be made in the
translation values when the scroller receives a “scroll-by-arrow” message.
æKY TScroller.fTranslation
æD fTranslation: VPoint;
æFi UMacApp.p
æT FIELD
æC The number of pixels, either horizontally or vertically, by which all
coordinates in the scroller are translated.
æKY TSScrollBar.fScrollers
æD fScrollers: TList;
æFi UMacApp.p
æT FIELD
æC A list of the scroller views associated with the scroll bar.
æKY TStaticText.fAutoWrap
æD fAutoWrap: BOOLEAN;
æFi UDialog.p
æT FIELD
æC TRUE if the view will automatically word wrap lines at the view boundary; FALSE
if the view will wrap lines only at carriage returns.
æKY TStaticText.fDataHandle
æD fDataHandle: StringHandle;
æFi UDialog.p
æT FIELD
æC The handle to the string data.
æKY TStaticText.fIndex
æD fIndex: INTEGER;
æFi UDialog.p
æT FIELD
æC The index specifying which position in the string list the resource specified by
fRsrcID occupies.
æKY TStaticText.fJust
æD fJust: INTEGER;
æFi UDialog.p
æT FIELD
æC The string's justification.
æKY TStaticText.fRsrcID
æD fRsrcID: INTEGER;
æFi UDialog.p
æT FIELD
æC The resource ID of a string list.
æKY TStdPrintHandler.fFinderJobDialog
æD fFinderJobDialog: BOOLEAN;
æFi UPrinting.p
æT FIELD
æC TRUE if you want to display the job dialog box when printing from the Finder.
æKY TStdPrintHandler.fFinderSetup
æD fFinderSetup: BOOLEAN;
æFi UPrinting.p
æT FIELD
æC TRUE if you want to display the Page Setup dialog box when printing from the
Finder.
æKY TStdPrintHandler.fFixedSizePages
æD fFixedSizePages: ARRAY [VHSelect] OF BOOLEAN;
æFi UPrinting.p
æT FIELD
æC TRUE if the page strips are of fixed horizontal and vertical size.
æKY TStdPrintHandler.fHPrint
æD fHPrint: Handle;
æFi UPrinting.p
æT FIELD
æC A handle to the Printing Manager print record.
æKY TStdPrintHandler.fLastBreak
æD fLastBreak: VPoint;
æFi UPrinting.p
æT FIELD
æC The coordinates of the last page break computed.
æKY TStdPrintHandler.fLastCheckedPrinter
æD fLastCheckedPrinter: LONGINT;
æFi UPrinting.p
æT FIELD
æC The tick count from the point at which it was last known that the print handler
and the selected printer were synchronized.
æKY TStdPrintHandler.fLastPrinterName
æD fLastPrinterName: StringHandle;
æFi UPrinting.p
æT FIELD
æC The name of the printer driver at the time indicated by fLastCheckedPrinter.
æKY TStdPrintHandler.fLastStrip
æD fLastStrip: Point;
æFi UPrinting.p
æT FIELD
æC The last page strip for which a page break was computed.
æKY TStdPrintHandler.fMarginRes
æD fMarginRes: Point;
æFi UPrinting.p
æT FIELD
æC Originally set to 72 pixels or 1-inch margins on standard screens, this field is
modified by the CheckPrinter method when that method determines the actual
device resolution.
æKY TStdPrintHandler.fMinimalMargins
æD fMinimalMargins: BOOLEAN;
æFi UPrinting.p
æT FIELD
æC Set to TRUE when you want to maintain page margins in a way that allows use of
the entire printable area of the page.
æKY TStdPrintHandler.fPageAreas
æD fPageAreas: PageAreas;
æFi UPrinting.p
æT FIELD
æC A record defining the dimensions of the printed page. It contains the following
fields:
• theInk: A rectangle defining the printable part of the page. Its upper-left corner
is always (0,0). Its lower-right corner is the maximum page height and width attainable
on the given printer.
• thePaper: A rectangle defining the entire physical page, in the coordinate system
of theInk. Since the physical page is typically larger than the printable part of the
page, the upper-left corner of thePaper is negative, and the lower-right coordinates
are greater than those of theInk.
• theInterior: A rectangle, in the coordinate system of theInk, defining the part of
the page in which the print handler draws its view. The value of theInterior is never
larger than the value of theInk. It may be smaller than theInk if you want to inset
printing from the edges of the paper. The value of theInterior is computed by subtracting
the value of theMargins from the value of thePaper.
• theMargins: A rectangle defining the top, left, bottom, and right paper margins.
The margins define the distance from the edge of the physical page to the interior of
the page. The margins can never be smaller than the difference between theInk
and thePaper.
æKY TStdPrintHandler.fPageDirection
æD fPageDirection: VHSelect;
æFi UPrinting.p
æT FIELD
æC Indicates whether page numbering is horizontal or vertical. If the value of this
field is v, page 2 is below page 1, and so on; if the value is h, page 2 is to
the right of page 1, and so on. Ignore this field if the view is only one page
wide or only one page high
æKY TStdPrintHandler.fPageStrips
æD fPageStrips: Point;
æFi UPrinting.p
æT FIELD
æC The number of horizontal and vertical page strips.
æKY TStdPrintHandler.fPPrPort
æD fPPrPort:TPPrPort;
æFi UPrinting.p
æT FIELD
æC The printer port in use during printing.
æKY TStdPrintHandler.fPrintDialog
æD fPrintDialog:DialogPtr;
æFi UPrinting.p
æT FIELD
æC A reference to various printing dialog boxes.
æKY TStdPrintHandler.fPrinterDev
æD fPrinterDev: INTEGER;
æFi UPrinting.p
æT FIELD
æC The device number of the printer, returned by the Printing Manager.
æKY TStdPrintHandler.fPrintExtent
æD fPrintExtent: VRect;
æFi UPrinting.p
æT FIELD
æC The part of the view that is to be printed by the print handler.
æKY TStdPrintHandler.fShowBreaks
æD fShowBreaks: BOOLEAN;
æFi UPrinting.p
æT FIELD
æC Set to TRUE if you want to draw page breaks when drawing the view.
æKY TStdPrintHandler.fSquareDots
æD fSquareDots: BOOLEAN;
æFi UPrinting.p
æT FIELD
æC Applies to the ImageWriter® only. Set to TRUE if you want to use 72-by-72 dot
resolution; set to FALSE if you want to use 80-by-72 dot resolution (“tall
adjusted”).
æKY TStdPrintHandler.fStartPage
æD fStartPage: INTEGER;
æFi UPrinting.p
æT FIELD
æC The page number of the first page.
æKY TStdPrintHandler.fViewedRect
æD fViewedRect: VRect;
æFi UPrinting.p
æT FIELD
æC The part of the view that is visible in the current page.
æKY TTECommand.fHTE
æD fHTE: TEHandle;
æFi UTEView.p
æT FIELD
æC A handle to the actual TextEdit record on which commands operate. It is the same
record referenced by fTEView's fHTE; the handle is duplicated for code
efficiency.
æKY TTECommand.fNewEnd
æD fNewEnd: INTEGER;
æFi UTEView.p
æT FIELD
æC The location in the text of the end of any new text added by the command.
æKY TTECommand.fNewStart
æD fNewStart: INTEGER;
æFi UTEView.p
æT FIELD
æC The location in the text of the beginning of any new text added by the command.
æKY TTECommand.fNewStyles
æD fNewStyles: StScrpHandle;
æFi UTEView.p
æT FIELD
æC A handle to any new styles in the scrap.
æKY TTECommand.fNewText
æD fNewText: Handle;
æFi UTEView.p
æT FIELD
æC A handle to characters that the command adds.
æKY TTECommand.fOldEnd
æD fOldEnd: INTEGER;
æFi UTEView.p
æT FIELD
æC The selection's ending position just before a command is invoked.
æKY TTECommand.fOldStart
æD fOldStart: INTEGER;
æFi UTEView.p
æT FIELD
æC The selection's beginning position just before a command is invoked.
æKY TTECommand.fOldStyles
æD fOldStyles: StScrpHandle;
æFi UTEView.p
æT FIELD
æC A handle to the old styles in the scrap.
æKY TTECommand.fOldText
æD fOldText: Handle;
æFi UTEView.p
æT FIELD
æC A handle that provides temporary storage for the characters in the old
selection. If the old selection is an insertion point, then fOldStart is the same as
fOldEnd and the value of fOldText is NIL.
æKY TTECommand.fPadding
æD fPadding: Handle;
æFi UTEView.p
æT FIELD
æC A handle to fill the space in memory between new and old text. The use of
fPadding ensures that there will be sufficient memory to carry out Undo and Redo
commands.
æKY TTECommand.fStylePad
æD fStylePad: LONGINT;
æFi UTEView.p
æT FIELD
æC The difference in size between the new style record (after command execution)
and the old style record (before command execution).
æKY TTECommand.fTEView
æD fTEView: TTEView;
æFi UTEView.p
æT FIELD
æC The TTEView object on which commands operate.
æKY TTECommand.fTextPad
æD fTextPad: INTEGER;
æFi UTEView.p
æT FIELD
æC The value of fTextPad is the difference in size between new (after command
execution) text and old (before command execution) text.
æKY TTECutCopyCommand.fClipCreated
æD fClipCreated: BOOLEAN;
æFi UTEView.p
æT FIELD
æC TRUE indicates that the Clipboard view was created successfully.
æKY TTEStyleCommand.fMode
æD fMode: INTEGER;
æFi UTEView.p
æT FIELD
æC Indicates which style attributes are set; used only in nonstyled TextEdit
records.
æKY TTEStyleCommand.fNewTextStyle
æD fNewTextStyle: TextStyle;
æFi UTEView.p
æT FIELD
æC The new style to be imposed on a nonstyled text record.
æKY TTEStyleCommand.fOldTextStyle
æD fOldTextStyle: TextStyle;
æFi UTEView.p
æT FIELD
æC The original text style in a nonstyled (original TextEdit) text record.
æKY TTETypingCommand.fCompleted
æD fCompleted: BOOLEAN;
æFi UTEView.p
æT FIELD
æC TRUE if the command has already been completed. If the value of fCompleted is
FALSE, incoming keystrokes are considered extensions to the command.
æKY TTETypingCommand.fFirstChar
æD fFirstChar: Char;
æFi UTEView.p
æT FIELD
æC Stores the first character typed.
æKY TTEView.fAcceptsChanges
æD fAcceptsChanges: BOOLEAN;
æFi UTEView.p
æT FIELD
æC Set to FALSE for text that cannot accept any change; for example, Clipboard
text.
æKY TTEView.fAutoWrap
æD fAutoWrap: BOOLEAN;
æFi UTEView.p
æT FIELD
æC Set to FALSE if you want to wrap lines at carriage returns only.
æKY TTEView.fControlChars
æD fControlChars: ControlCharSet;
æFi UTEView.p
æT FIELD
æC The control characters that are to be accepted in text.
æKY TTEView.fFreeText
æD fFreeText: BOOLEAN;
æFi UTEView.p
æT FIELD
æC TRUE if the memory used by fText should be freed when Free is called.
æKY TTEView.fHTE
æD fHTE: TEHandle;
æFi UTEView.p
æT FIELD
æC fHTE is a handle to the actual TextEdit object on which commands operate. This
object is also referenced by the fHTE field of the TTECommand object associated
with the view; the handle is duplicated for code efficiency.
æKY TTEView.fInset
æD fInset: Rect;
æFi UTEView.p
æT FIELD
æC A rectangle defining the number of pixels by which to inset the TERecord's view
rectangle from the view's extent. Thus, fInset defines margins around the edges
of the view. Views with text that wraps automatically must have a bottom
margin of 0.
æKY TTEView.fJustification
æD fJustification: INTEGER;
æFi UTEView.p
æT FIELD
æC The justification of the text record.
æKY TTEView.fKeyCmdNumber
æD fKeyCmdNumber: CmdNumber;
æFi UTEView.p
æT FIELD
æC The string number for the Undo Typing command.
æKY TTEView.fLastHeight
æD fLastHeight: LONGINT;
æFi UTEView.p
æT FIELD
æC The last cached value for the height of the record.
æKY TTEView.fLastLine
æD fLastLine: INTEGER;
æFi UTEView.p
æT FIELD
æC The line number of the last page break cached.
æKY TTEView.fLastPageBreak
æD fLastPageBreak: INTEGER;
æFi UTEView.p
æT FIELD
æC The last page break cached. MacApp uses fLastPageBreak when computing page
breaks for printing.
æKY TTEView.fLastWidth
æD fLastWidth:LONGINT;
æFi UTEView.p
æT FIELD
æC Represents the last checked width, in pixels. In MacApp 2.0, the field is not
used if the TextEdit record is styled.
æKY TTEView.fMaxChars
æD fMaxChars: INTEGER;
æFi UTEView.p
æT FIELD
æC Maximum number of characters that fText will accept. The default value is
MAXINT; you can set fMaxChars to a different value.
æKY TTEView.fMinAhead
æD fMinAhead: INTEGER;
æFi UTEView.p
æT FIELD
æC This field specifies the minimum amount of automatic scrolling forward that
should take place when the selection scrolls into view.
æKY TTEView.fSavedTEHandle
æD fSavedTEHandle: Handle;
æFi UTEView.p
æT FIELD
æC The handle returned by the Toolbox function TENew.
æKY TTEView.fSpecsChanged
æD fSpecsChanged: BOOLEAN;
æFi UTEView.p
æT FIELD
æC Set to TRUE if something happens that could affect the font, style, size, or
color of a menu item needing updating. You should reset fSpecsChanged to FALSE
when the application has taken appropriate action.
æKY TTEView.fStyleType
æD fStyleType: BOOLEAN;
æFi UTEView.p
æT FIELD
æC Set to kWithStyle if the text record is styled; set to kWithOutStyle if the
record is not styled.
æKY TTEView.fText
æD fText: Handle;
æFi UTEView.p
æT FIELD
æC A handle to the text in the record associated with the handle TEHandle.
æKY TTEView.fTextStyle
æD fTextStyle: TextStyle;
æFi UTEView.p
æT FIELD
æC The text style (color, size, and so on).
æKY TTEView.fTypingCommand
æD fTypingCommand: TTETypingCommand;
æFi UTEView.p
æT FIELD
æC The current TTETypingCommand object relating to this object. MacApp sets the
value of this field to NIL if there is none.
æKY TTextGridView.fLineAscent
æD fLineAscent: INTEGER;
æFi UGridView.p
æT FIELD
æC The position of the text's baseline relative to the top of the line.
æKY TTextGridView.fLineHeight
æD fLineHeight: INTEGER;
æFi UGridView.p
æT FIELD
æC The height of each item, including leading.
æKY TTextGridView.fTextStyle
æD fTextStyle: TextStyle;
æFi UGridView.p
æT FIELD
æC The font, font size, style, and color of the text.
æKY TTranscriptView.fCols
æD fCols: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The maximum number of characters per line.
æKY TTranscriptView.fFirstLineIndex
æD fFirstLineIndex: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC Indexes where the top line starts in the array of line lengths and starts.
æKY TTranscriptView.fFontHeight
æD fFontHeight: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The font height, in points.
æKY TTranscriptView.fFontInfo
æD fFontInfo: FontInfo;
æFi UTranscriptView.p
æT FIELD
æC Information about the current grafPort's character font, described in pixels:
the ascent, descent, maximum character width (the greatest distance the pen will
move when a character is drawn), and leading (the vertical distance between the
descent line and the ascent line below it). These values take into
consideration the font size and any styles that are applied to the text.
æKY TTranscriptView.fForcePtr
æD fForcePtr:INTEGER;
æFi UTranscriptView.p
æT FIELD
æC This field is the top of the stack in fForceStack.
æKY TTranscriptView.fForceStack
æD fForceStack: ARRAY [1..kForceDepth] OF ForceState;
æFi UTranscriptView.p
æT FIELD
æC This is a stack of forced output states. ForceOutput and EndForce methods push
and pop this stack, respectively.
æKY TTranscriptView.fGotRefnum
æD fGotRefnum: BOOLEAN;
æFi UTranscriptView.p
æT FIELD
æC TRUE if a reference number for output redirection is in fRefnum.
æKY TTranscriptView.fHelpProc
æD fHelpProc: ProcPtr;
æFi UTranscriptView.p
æT FIELD
æC Call this to display a help window in response to the Help key.
æKY TTranscriptView.fInsertionPointOn
æD fInsertionPointOn: BOOLEAN;
æFi UTranscriptView.p
æT FIELD
æC TRUE if the insertion poin was turned on when exiting the idle chain.
æKY TTranscriptView.fInsertionPt
æD fInsertionPt: Point;
æFi UTranscriptView.p
æT FIELD
æC The location of the insertion point, described as the intersection of a row and
column.
æKY TTranscriptView.fLastCh
æD fLastCh: CHAR;
æFi UTranscriptView.p
æT FIELD
æC The last character typed.
æKY TTranscriptView.fLastInsertionPointTime
æD fLastInsertionPointTime: Longint;
æFi UTranscriptView.p
æT FIELD
æC The last time, in ticks, that the insertion point was displayed.
æKY TTranscriptView.fLineLengths
æD fLineLengths: HLineLens;
æFi UTranscriptView.p
æT FIELD
æC The line length of each line; that is, the number of characters in the line.
æKY TTranscriptView.fLineStarts
æD fLineStarts: HLineLens;
æFi UTranscriptView.p
æT FIELD
æC The amount by which the first character in the line is offset from the fText
handle.
æKY TTranscriptView.fRefnum
æD fRefnum: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The reference number indicating where to send the output of
TTranscriptView.Redirect.
æKY TTranscriptView.fRows
æD fRows: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The number of lines saved in the transcript.
æKY TTranscriptView.fText
æD fText: HText;
æFi UTranscriptView.p
æT FIELD
æC The handle to the ring buffer; blank characters fill out each line to 80
characters.
æKY TTranscriptView.fTextStyle
æD fTextStyle: TextStyle;
æFi UTranscriptView.p
æT FIELD
æC The text style (color, size, and so on).
æKY TTranscriptView.fTotal
æD fTotal: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The number of characters in all lines in the Debug Transcript window.
æKY TTranscriptView.fUpdateRgn
æD fUpdateRgn: RgnHandle;
æFi UTranscriptView.p
æT FIELD
æC A handle used in a scrolling shortcut.
æKY TTranscriptView.fVRefNum
æD fVRefNum: INTEGER;
æFi UTranscriptView.p
æT FIELD
æC The volume reference number used by TTranscriptView.Redirect in writing the
contents of the Debug Transcript window to a file.
æKY TTranscriptView.fWrToFile
æD fWrToFile: BOOLEAN;
æFi UTranscriptView.p
æT FIELD
æC Set to TRUE to enable recording of the transcript data to a file.
æKY TTranscriptView.fWrToWindow
æD fWrToWindow: BOOLEAN;
æFi UTranscriptView.p
æT FIELD
æC Set to TRUE to enable display of the transcript data in a view.
æKY TView.fDocument
æD fDocument: TDocument;
æFi UMacApp.p
æT FIELD
æC The document whose data the view represents. If the view is not associated with
a document, set the value of this field to NIL. The value of fDocument usually
is NIL if the view does not directly represent a document’s data. Thus, views
such as scrollers and controls typically have a value of NIL in the fDocument
field.
æKY TView.fFocusRec
æD fFocusRec: FocusRec;
æFi UMacApp.p
æT FIELD
æC The cached focus information for the view.
æKY TView.fHLDesired
æD fHLDesired: HLState;
æFi UMacApp.p
æT FIELD
æC The type of highlighting used to draw the view’s selection. MacApp sets this
field to hlOn when the view is activated and to hlDim when the view is
deactivated.
æKY TView.fIdentifier
æD fIdentifier: IDType;
æFi UMacApp.p
æT FIELD
æC A four-character code that identifies this view. Given the view’s identifier,
you can obtain a reference to the view by using the TView.FindSubView method.
æKY TView.fLocation
æD fLocation: VPoint;
æFi UMacApp.p
æT FIELD
æC The location of the view in its superview’s coordinate space.
æKY TView.fPrintHandler
æD fPrintHandler: TPrintHandler;
æFi UMacApp.p
æT FIELD
æC A reference to the print handler associated with the view.
æKY TView.fShown
æD fShown: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the view is shown; FALSE indicates that the view is hidden.
You normally do not access this field directly; instead, use the methods
TView.Show and TView.IsShown.
æKY TView.fSize
æD fSize: VPoint;
æFi UMacApp.p
æT FIELD
æC The horizontal and vertical size of the view.
æKY TView.fSizeDeterminer
æD fSizeDeterminer: ARRAY [VHSelect] OF SizeDeterminer;
æFi UMacApp.p
æT FIELD
æC Indicates the techniques used to compute the view's width and height. The
technique used for computing the width may be different from the technique used for
the height. Possible values are sizeFixed (the view’s width or height is
constant), sizeVariable (the view determines its width or height by overriding
TView.CalcMinSize), sizePage (the view’s width or height is exactly one page whose
size is determined by the view’s print handler), sizeFillPages (the view's
CalcMinSize method overrides INHERITED CalcMinSize to determine its minimum size,
which is then rounded up to fill the last page in the specified direction),
sizeSuperView (the view’s width or height is the same as its superview—when its
superview changes size, the view’s size changes as well), or sizeRelSuperView (the
view's width or height changes relative to its superview’s size—when the
superview’s size changes, the view’s size changes by the same amount).
æKY TView.fSubViews
æD fSubViews: TList;
æFi UMacApp.p
æT FIELD
æC A TList object implementing a list of views contained in this view.
æKY TView.fSuperView
æD fSuperView: TView;
æFi UMacApp.p
æT FIELD
æC The view in which this view appears. The fSuperView field of a window always has
the value NIL, since windows are assumed to be at the top of the view
hierarchy.
æKY TView.fViewEnabled
æD fViewEnabled: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if the view responds to mouse clicks. You usually do not access this field
directly; instead, use the methods TView.ViewEnable and TView.IsViewEnabled.
æKY TWindow.fAdapted
æD fAdapted: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you called TWindow.AdaptToScreen when activating the window.
AdaptToScreen resizes the window to fit the screen of the CPU that is running the
application.
æKY TWindow.fClosesDocument
æD fClosesDocument: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE to close the document when the window closes. The default value is
TRUE.
æKY TWindow.fConstTitle
æD fConstTitle: INTEGER;
æFi UMacApp.p
æT FIELD
æC Used to parse the window title into a constant part and a part replaced by the
window’s document name.
æKY TWindow.fContDifference
æD fContDifference: Point;
æFi UMacApp.p
æT FIELD
æC The total amount the content is less than and offset into the structure (this
allows for the title bar and so on).
æKY TWindow.fContRgnInset
æD fContRgnInset: Point;
æFi UMacApp.p
æT FIELD
æC The top left inset of the content region in the struc region.
æKY TWindow.fDisposeOnFree
æD fDisposeOnFree: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want MacApp to dispose of the associated Window Manager
window when the TWindow object is freed.
æKY TWindow.fDoFirstClick
æD fDoFirstClick: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the window responds to mouse clicks even when it isn’t the
frontmost window. The default value is FALSE.
æKY TWindow.fFloats
æD fFloats: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the window will "float" above the other windows—that is, it
will never be considered active—and will not be affected by the methods
TWindow.DebugGetActiveWindow, TApplication.GetFrontWindow, and
TApplication.GetActiveWindow. The default value of fFloats is FALSE. This field is not supported in
MacApp 2.0.
æKY TWindow.fForcedOnScreen
æD fForcedOnScreen: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want the window to be located and resized so that part of it
will show on the screen of the currently running CPU.
æKY TWindow.fFreeOnClosing
æD fFreeOnClosing: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want to free this object when the window is closed. The
default value is FALSE.
æKY TWindow.fHorzCentered
æD fHorzCentered: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if you want the window's Center method to center it horizontally on
the screen.
æKY TWindow.fIsActive
æD fIsActive: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE if this window is active. An activate event that hasn’t been handled yet
may cause fIsActive to have the value TRUE even if the window specified by
fWMgrWindow is not the frontmost window.
æKY TWindow.fIsClosable
æD fIsClosable: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the Close menu item is enabled when the window is active. If
the window has a close box, then fIsClosable is initially set to TRUE.
æKY TWindow.fIsModal
æD fIsModal: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the window is modal—that is, no other window can be
activated while this one is active, although the menu bar is available.
æKY TWindow.fIsResizable
æD fIsResizable: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the window has a size box.
æKY TWindow.fMoveBounds
æD fMoveBounds: Rect;
æFi UMacApp.p
æT FIELD
æC A rectangle defining the boundaries of the area in which it is possible to drag
the window. Its default value is gStdWMoveBounds.
æKY TWindow.fMustAdapt
æD fMustAdapt : BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE specifies that the window must be adapted to the screen.
æKY TWindow.fMustForceOnScreen
æD fMustForceOnScreen : BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE specifies that the window’s position must be changed to one that is on the
screen.
æKY TWindow.fMustHorzCenter
æD fMustHorzCenter : BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that the window requires horizontal centering.
æKY TWindow.fMustStagger
æD fMustStagger : BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE specifies that this window requires staggering.
æKY TWindow.fMustVertCenter
æD fMustVertCenter : BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE specifies that this window requires vertical centering.
æKY TWindow.fOpenInitially
æD fOpenInitially: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC TRUE indicates that this window is opened when the window’s document is opened.
The default value is TRUE.
æKY TWindow.fPreDocname
æD fPreDocname: INTEGER;
æFi UMacApp.p
æT FIELD
æC Used to parse the window title into a constant part and a part replaced by the
window’s document name.
æKY TWindow.fProcId
æD fProcId: INTEGER;
æFi UMacApp.p
æT FIELD
æC The window definition function that defines the Window Manager window associated
with the TWindow object.
æKY TWindow.fResizeLimits
æD fResizeLimits: Rect;
æFi UMacApp.p
æT FIELD
æC A rectangle defining the minimum and maximum sizes of the window. It is
initially set to gStdWSizeRect.
æKY TWindow.fStaggered
æD fStaggered: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if the window was staggered by its Stagger method.
æKY TWindow.fTarget
æD fTarget: TEvtHandler;
æFi UMacApp.p
æT FIELD
æC The event handler, usually a view, that becomes the application’s target
(gTarget) when the window is active.
æKY TWindow.fTargetId
æD fTargetId: IDType;
æFi UMacApp.p
æT FIELD
æC The identifier of the view that will be the window’s initial target when it is
created from a resource template.
æKY TWindow.fVertCentered
æD fVertCentered: BOOLEAN;
æFi UMacApp.p
æT FIELD
æC Set to TRUE if the window was centered vertically by its Center method.
æKY TWindow.fWMgrWindow
æD fWMgrWindow: WindowPtr;
æFi UMacApp.p
æT FIELD
æC The pointer to this window's corresponding Window Manager window.
æKY Global Routines
æKL
%_BP
%_CLASSINFO
%_DISCIPLINEDISPATCH
%_DISCIPLINEDISPATCH_PATCHPOINT
%_EP
%_EX
%_INITOBJ
%_INOBJ
%_JMPTOTRAP
%_METHOD
%_NewMethod
%_OBCHK
%_OBDISP
%_ObjError
%_OBNEW
%_OptInitObj
%_OPTINOBJ
%_OptSetCI
%_PGM1
_addDevHandler
_DataInit
ActionProcForTScrollBar
AddAllRsrc
AddHandle
AddNewObjectsToInspector
AddObjectToInspector
AddSegSizes
AddVPt
AllocateObjectsFromPerm
AllocBlock
ALoadMacAppSeg
APostLoadMacAppSeg
ApplicationBeep
Assertion
AtMAName
AtStr
aVBLTask
AWatchTask
BlockSet
BuildAllReserves
BuildCodeReserve
BuildMessage
BusyActivate
BusyDelay
BusyInstall
BusyRemove
BusyReset
BusyTurnOff
CallAlertFilter
CallCapture
CallEnter
CallFileFilter
CallFlagActionProc
CallHelpProc
CallInspector
CallNotify
CallSymActionProc
CallSymbolLookup
CallWDefProc
CanPaste
CanReadLn
CanWriteLn
CatchFailures
CenterRectOnScreen
CheckFreeMasters
CheckReserve
CheckRsrcUsage
CleanupMacApp
ClearTheFPU
ClickLoopForTTEView
CloseFile
ClrBreakCmd
CmdEnabled
CmdFromMenuItem
CmdToComponents
CmdToMenuItem
CmdToName
CompareStrings
ConcatNumber
ConfigRecFields
CopyStr255
CurrentCursor
DebugCanReadLn
DebugCanWriteLn
DebugCapture
DebugEndForce
DebugException
DebugFlag
DebugForceOutput
DebugGetActiveDocument
DebugGetActiveWindow
DebugGetLastCommand
DebugGlobalHandle
DebugPerfMonitor
DebugReadCh
DebugReadLn
DebugRedirect
DebugShowTranscriptWindow
DebugTerminate
DebugTranscriptWidth
DebugWriteLn
DefaultSize
DefineConfiguration
DeleteFile
DevClose
DevFAccess
DevIoctl
DevRead
DevWrite
DisciplineMethodCalls
DisposeIfHandle
DisposeIfPtr
DisposIfHandle
DisposIfPtr
DoChangeReserve
DoFailure
DoInitUMacApp
DoInitUMemory
DoneViewRsrc
DoneWithTempRgn
DoRealInitToolBox
DoShowAboutAppFilter
DoToSubView
DoWaiting
DumpTERecord
DumpTTECommand
EachClassDo
EachFailureHandlerDo
EachFrameDo
EachMenuDo
EachPatchDo
EachSubClassDo
EachSuperClassDo
EachWMgrWindowDo
EmptyVRect
Enable
EnableCheck
EntDebugger
EnterMacAppDebugger
EqualBlocks
EqualVPt
EqualVRect
ErrorAlert
ExchangeHandles
ExitMacApp
ExpandPtr
ExpandPtrWStr
FailMemError
FailNewMessage
FailNIL
FailNILResource
FailNonObject
FailNoReserve
FailOSErr
FailResError
FailSpaceIsLow
Failure
FieldToString
FileModDate
FillInDirID
FinderSegProc
FindWindowBefore
ForceBusy
FreeIfObject
FreeIfWMgrWindow
FreeListIfObject
FreeObject
FreeWMgrWindow
GetA5
GetActualJustification
GetAndLoadWDefProc
GetCallersMethodName
GetClassID
GetClassIDFromName
GetClassNameFromID
GetClassSizeFromId
GetCrsrBusy
GetCurJTOffset
GetCurStackBase
GetCurStackFramePtr
GetCurStackTop
GetDirID
GetErrTxt
GetFileInfo
GetFocus
GetFontNum
GetFrameInfo
GetFreeMastersCount
GetFSFCBLen
GetGZMoveHnd
GetGZRootHnd
GetHandleBits
GetHwCfgFlags
GetIfBkColor
GetIfColor
GetLevel
GetLMMBarHeight
GetMenuColors
GetMenuList
GetMethodName
GetNewCenteredDialog
GetParmBlockPtr
GetPortFontInfo
GetPortTextStyle
GetProcName
GetPromptedChar
GetPromptedNames
GetPromptedNumber
GetPromptedNumberWithDefault
GetPromptedString
GetPromptedStringWithDefault
GetPromptedValue
GetRcvrAtLevel
GetReserveSize
GetResLoad
GetResMenu
GetROMMapInsert
GetSaveVisRgnPtr
GetSegFromPC
GetSegNumber
GetSegResource
GetSegSize
GetSuperClassID
GetSuperClassTableHandle
GetTextStyleFontInfo
GetTheCrsr
GetTrapType
GetUnitNtryCnt
GetUTableBase
GetWindowList
GetWindowVariant
GrowZoneProc
HandleIsEligible
HandlerExists
HdlInitFailed
Head1Patch
HeadPatch
HeapCmd
IdleProcForTStdPrintHandler
IDUDebug
IDUobject
IDUTranscriptView
InitializationThatMustNotFail
InitMacAppCursor
InitPrinting
InitToolBox
InitUBusyCursor
InitUDebug
InitUDebugAfterIApplication
InitUDialog
InitUGridView
InitUInspector
InitUMacApp
InitUMemory
InitUMenuSetup
InitUObject
InitUPatch
InitUPrinting
InitUTEView
InsetVRect
InspectField
InspectObject
InstallAnNMRequest
InstallDispatcher
InstallGrowZoneProc
InstallIfPrintHandler
InstallInterceptors
InstallWriteLnHook
IntMultiply
InvalidateMenuBar
InvalidateMenus
IsClassIDMemberClass
IsFreeHandle
IsHandle
IsHandleLocked
IsHandlePurged
IsMemberClassID
IsObject
IsUserBreak
JTOffProc
LengthRect
LengthVRect
LIntToHex
LoadMacAppSegment
LoadResidentSegments
LockHandleHigh
LongerSide
LookupErrString
LookupSymbol
LowerChar
LowerStr255
MacAppAlert
MacAppAlertFilter
MACount1Resources
MACountResources
MADebuggerMainEntry
MADrawString
MAGet1IndResource
MAGet1NamedResource
MAGet1Resource
MAGetIndResource
MAGetMenu
MAGetNamedResource
MAGetNewMBar
MAGetResource
MainHelpProc
MAInsertMenu
MAInvalMenuBar
MakeInspector
MakeInspectorWindow
MakeNewInstance
MakeNewRgn
MAOpenFile
MATextBox
MAUseResFile
Max
MemSpaceIsLow
MenuBarHasPendingUpdate
MenusHavePendingUpdate
Min
MinMax
NeedCalcMenuSize
NewAllocatedList
NewList
NewObjectByClassId
NewObjectByClassName
NewPaletteWindow
NewPermHandle
NewPermPtr
NewSimpleWindow
NewSortedList
NewStdObject
NewTemplateWindow
NewTWindow
NewViewRsrc
NotYetImplemented
NullMenuProc
NumberToHex
NumBlocks
NumToolboxTraps
OBJFail
OffsetPtr
OffsetPtrWStr
OffsetVRect
OptionKeyIsDown
OrderClassIdsByName
ParseTitleTemplate
PatchTrap
PerfCmd
PerformMenuSetup
PermAllocation
PinOnRect
PinVRect
PointerToHex
PositionDebugWindow
PostLoadMacAppSegment
PreloadSegment
PreloadSegmentResource
ProgramBreak
ProgramReport
PRStr
Pt2VRect
PtInVRect
PtIsVisible
PtToVPt
PullApplicationToFront
PushLong
PutDeskScrapData
ReadInteger
ReadYesNo
RectIsVisible
RectsNest
RectToVRect
RegisterStdType
RemHandle
RemoveAnyNMRequests
RemoveObjectFromInspector
ResetBusyCursor
RoundUp
SaveEventQueue
ScanHandles
ScrapStuffFields
SectVRect
SetBreakCmd
SetCallBack
SetCMacAppCursor
SetCmdIcon
SetCmdName
SetFocus
SetGetProc
SetHandleBits
SetHLPenState
SetIfBkColor
SetIfColor
SetIndCmdName
SetKeyScript
SetMacAppCursor
SetMenuState
SetPermHandleSize
SetPermPtrSize
SetPortTextStyle
SetPutProc
SetReserveSize
SetResidentSegment
SetRGBColor
SetSelect
SetStackSpace
SetStyle
SetTextStyle
SetVPt
SetVRect
ShowDisasmMemory
ShowFields
ShowHeapInfo
ShowHierarchy
ShowLocals
ShowMemory
ShowNames
ShowParameters
ShowRecent
ShowStack
ShowStatus
ShowSymbolWhich
ShowTempSpace
ShowWhere
ShowWhich
StdAlert
StdFieldToString
StdHelpProc
StdNoRect
StripLong
SubstituteInTitle
SubVPt
Success
TestRecoverHandle
TextStyleFields
ToggleCmd
TotalTempSize
TraceMenuName
TrapExists
TrcEnable
UnionVRect
UnloadAllSegments
UnpatchAll
UnpatchTrap
UprChar
UprMAName
UprStr255
UseROMMap
UseSelectionColor
UseTempRgn
ValidateConfiguration
ValidateMenuBar
ValidateMenus
VBLInstall
VBLRemove
VerboseIsHandle
VerboseIsObject
VisibleRect
VPtToPt
VRectsNest
VRectToRect
WindCmd
WithApplicationResFileDo
WithCodeResFileDo
WithHideFromMacAppDo
WriteBoolean
WriteChar
WriteFocus
WriteHandleContents
WriteHexInt
WriteHexLongint
WritePt
WritePtr
WriteRect
WriteReserves
WriteSig
WriteVPt
WriteVRect
WrLblBoolean
WrLblField
WrLblHandleContents
WrLblHexInt
WrLblHexLongint
WrLblPt
WrLblPtr
WrLblRect
WrLblSig
WrLblVPt
WrLblVRect
XDebugAddrError
XDebugBusError
XDebugCheck
XDebugIllInst
XDebugLineF
XDebugOverflow
XDebugSysError
XDebugZeroDiv
YouAreWarned
æKY %_BP
æD PROCEDURE %_BP;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_CLASSINFO
æD PROCEDURE %_CLASSINFO; EXTERNAL;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_DISCIPLINEDISPATCH
æD PROCEDURE %_DISCIPLINEDISPATCH; EXTERNAL;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_DISCIPLINEDISPATCH_PATCHPOINT
æD PROCEDURE %_BP;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_EP
æD PROCEDURE %_EP;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_EX
æD PROCEDURE %_EX;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_INITOBJ
æD PROCEDURE %_INITOBJ;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_INOBJ
æD PROCEDURE %_INOBJ;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_JMPTOTRAP
æD PROCEDURE %_JMPTOTRAP;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_METHOD
æD PROCEDURE %_METHOD;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_NewMethod
æD PROCEDURE %_NewMethod;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_OBCHK
æD FUNCTION %_OBCHK(obj: TObject; jumpTablePtr: Ptr): TObject;
æFi UObject.Globals
æT PROCEDURE
æC The %_OBCHK routine verifies object coercions (that is, the type casting of the
object) at run time. It returns its obj parameter if the parameter is NIL or passes
the membership test; otherwise, it calls the global routine ObjFail.
The obj parameter specifies the data to be verified as a valid object. The
jumpTablePtr parameter is a pointer to the jump table.
MacApp calls this low level routine at run time to verify object coercions. Do not
call this routine yourself.
æKY %_OBDISP
æD PROCEDURE %_OBDISP(obj: TObject);
æFi UObject.Globals
æT PROCEDURE
æC This low-level routine frees a non-NIL object.
The obj parameter is the object to be freed.
This routine is used internally by MacApp. You never need to call it yourself.
æKY %_ObjError
æD PROCEDURE %_ObjError;
æFi UObject.Globals
æT PROCEDURE
æC The %_ObjError routine is a low level error routine that the method-dispatch
routine in ROM calls if a method is not found. The address of %_ObjError is stored
at the low-memory location MAErrProc.
MacApp itself does not call this routine; it is called by the ROM-based method
dispatcher. Do not call this routine yourself.
æKY %_OBNEW
æD PROCEDURE %_OBNEW(VAR obj: TObject; jumpTablePtr: Ptr; itsSize: INTEGER);
æFi UObject.Globals
æT PROCEDURE
æC This low level routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY %_OptInitObj
æD PROCEDURE %_OptInitObj;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_OPTINOBJ
æD FUNCTION %_OPTINOBJ(obj: TObject; jumpTablePtr: Ptr): BOOLEAN;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_OptSetCI
æD PROCEDURE %_BP;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY %_PGM1
æD PROCEDURE %_PGM1;
æFi UObject.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY _addDevHandler
æD FUNCTION _addDevHandler(slot, dvName, dvFAccess, dvClose, dvRead, dvWrite,
dvIoctl: Longint): Longint;C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY _DataInit
æD PROCEDURE _DataInit;
æFi UMacAppUtilities
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY ActionProcForTScrollBar
æD PROCEDURE ActionProcForTScrollBar(aCMgrControl: ControlHandle;
partCode: INTEGER);
æFi UMacApp
æT PROCEDURE
æC ActionProcForTScrollBar performs the normal actions associated with a scroll
bar’s screen image while the user is operating the scroll bar.
The aCMgrControl parameter is a handle to the Control Manager scroll bar that is
being operated. The partCode parameter is the part code that corresponds to the
part of the scroll bar in which the user clicked.
MacApp uses ActionProcForTScrollBar to implement its scroll bars. You usually do
not need to call this routine yourself.
æKY AddAllRsrc
æD PROCEDURE AddAllRsrc(rType: ResType; toList: HHandleList);
æFi UMemory
æT PROCEDURE
æC AddAllRsrc searches all open resource files for resources of the specified type
and adds handles to them to a list (it does not add the resources already present
in ROM).
This routine then places a handle to the list at the beginning of the list. The rType
parameter specifies the resource type of the resources to be added to the list. The
toList parameter specifies the list to which this routine adds handles.
MacApp calls AddAllRsrc to create or add to a list of resources of a specified type.
You can use this routine in a similar fashion.
æKY AddHandle
æD PROCEDURE AddHandle(h: Handle; toList: HHandleList);
æFi UMemory
æT PROCEDURE
æC AddHandle adds a handle to the front of the specified list of handles; it does
not determine if the handle already exists in the list.
The h parameter is the handle to be added to the list. The toList parameter specifies
the list to which the handle is to be added.
MacApp calls AddHandle from the global routine AddAllRsrc to add a handle to the list
that contains handles to resources. You can use AddHandle in a similar fashion.
æKY AddNewObjectsToInspector
æD FUNCTION AddNewObjectsToInspector(add: BOOLEAN): BOOLEAN;
æFi UObject
æT PROCEDURE
æC AddNewObjectsToInspector sets the global variable pAddNewObjectsToInspector to
the specified value; it also returns the value of the old setting. The default
setting is TRUE.
If you set the value of the add parameter to TRUE, MacApp automatically adds all
newly created objects to the the Inspector's list of existing objects.
MacApp calls AddNewObjectsToInspector from several methods involved in the the
setup and operation of the Inspector. You usually do not need to call this routine
yourself.
æKY AddObjectToInspector
æD PROCEDURE AddObjectToInspector(theObject: TObject);
æFi UInspector
æT PROCEDURE
æC AddObjectToInspector adds an object to the Inspector's list of existing objects.
The parameter theObject is the object to be added to the list.
MacApp calls AddObjectToInspector when an object is created or cloned. You usually
do not need to call this routine yourself.
æKY AddSegSizes
æD FUNCTION AddSegSizes(segRsrc: Handle): LONGINT;
æFi UMemory
æT PROCEDURE
æC AddSegSizes returns the total size, in bytes, of the code segments whose names
are in the specified string list; these are the currently loaded segments.
The segRsrc parameter is a handle to the segment map, which is a string list
containing the names of the segments whose sizes are to be summed.
MacApp calls AddSegSizes from the global routine DoInitUMemory when computing
memory requirements necessary for running the application. You usually do not need
to call this routine yourself.
æKY AddVPt
æD PROCEDURE AddVPt(srcVPt: VPoint; VAR dstVPt: VPoint);
æFi UViewCoords
æT PROCEDURE
æC AddVPt adds two MacApp view points, producing a new view point whose x and y
coordinates are the sums of the x and y coordinates of the two original points.
The srcVPt parameter is the first of the two view points to be added. When the
routine is called, the dstVPt parameter is the second of the two view points to be
added; when the routine returns, the dstVPt parameter is the view point that results
from adding the two specified points.
AddVPt is called by methods of TApplication, TScroller, and TView when a view is
being scrolled. You can use AddVPt to add two view coordinates and express the
result as a new view coordinate.
æKY AllocateObjectsFromPerm
æD FUNCTION AllocateObjectsFromPerm(allocateFromPerm: BOOLEAN): BOOLEAN;
æFi UObject
æT PROCEDURE
æC AllocateObjectsFromPerm determines whether object allocation calls make requests
for permanent or temporary memory. This routine returns the previous state as its
result.
Set the allocateFromPerm parameter to TRUE if you want object allocation calls to use
permanent memory; set it to FALSE if you want object allocation calls to use
temporary memory—that is, if they are not allowed to fail. The default value of
allocateFromPerm is TRUE. This routine returns the previous state of the
allocateFromPerm parameter.
MacApp calls AllocateObjectsFromPerm when creating command objects to execute menu
commands. You can use this routine to condition requests for memory when creating
objects.
æKY AllocBlock
æD FUNCTION AllocBlock(blockSize: INTEGER; trapNum: INTEGER;
VAR thePatch: TrapPatch): Ptr;
æFi UPatch
æT PROCEDURE
æC AllocBlock allocates a nonrelocatable block of the specified size in the system
heap and returns a pointer to the newly allocated block. If necessary, AllocBlock
patches the 68xxx exception vector (“trap”) specified.
The blockSize parameter specifies the size, in bytes, of the block to be allocated.
The trapNum parameter specifies the trap to be patched (if applicable). You can use
the parameter thePatch to pass the code to be installed in place of the specified trap.
If the value of blockSize is 0, then no block is allocated and AllocBlock simply fills
in the fields of thePatch.
MacApp calls AllocBlock to patch traps at startup time. You usually do not need
to call this routine yourself.
æKY ALoadMacAppSeg
æD PROCEDURE ALoadMacAppSeg;
æFi UMemory
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY APostLoadMacAppSeg
æD PROCEDURE APostLoadMacAppSeg;
æFi UMemory
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never
need to call it yourself.
æKY ApplicationBeep
æD PROCEDURE ApplicationBeep;
æFi UMacApp.Globals
æT PROCEDURE
æC ApplicationBeep calls gApplication.Beep with a duration of 2 ticks. If
gApplication is NIL, then this routine calls the Toolbox routine SysBeep with the
same duration value.
MacApp calls ApplicationBeep from the global routine ProgramReport to alert the
programmer that an error has occurred. You can use ApplicationBeep in a similar
fashion.
æKY Assertion
æD PROCEDURE Assertion(condition: Boolean; description: StringPtr);
æFi UFailure
æT PROCEDURE
æC Assertion writes an error message when the specified condition is not met. If the
application has been compiled with debugging code included, Assertion enters
the MacApp debugger and writes an error message to the Debug Transcript, giving the
user the option to signal Failure. If the application has been compiled with
debugging code included and writing to the Debug Transcript is disabled, the
error message is written to the currently installed debugger, the debugger is
invoked, and the routine signals Failure. Otherwise, the routine signals Failure.
The condition parameter specifies a Boolean value that satisfies the assertion.
The description parameter is a string describing the assertion that was not
satisfied. Note: Pascal users can call the inline function AtStr to set the value of
the description parameter. AtStr returns a pointer to a specified string.
If the application is compiled with debugging code included, MacApp calls Assertion
from TApplication.Idle to test the validity of gTarget. You can use Assertion in
a similar fashion.
æKY AtMAName
æD FUNCTION AtMAName(astr: MAName): PMAName;
æFi UMacAppUtilities
æT PROCEDURE
æC AtMAName returns the address of the specified string or string constant so that
you can pass pointers with no stack copy.
The astr parameter is the string constant whose address is to be returned by
this routine.
You can call AtMAName to obtain a pointer to a specified MAName string. The syntax of
a call to AtMAName is AtMAName('Foo');
æKY AtStr
æD FUNCTION AtStr(astr: Str255): StringPtr;
æFi UMacAppUtilities
æT PROCEDURE
æC AtStr returns the address of the specified string or string constant so that you
can pass pointers with no stack copy.
The astr parameter is the string constant whose address is to be returned by
this routine.
You can call AtStr to obtain a pointer to a specified string. The syntax of a
call to AtStr is AtStr('Foo');
æKY aVBLTask
æD PROCEDURE aVBLTask;
æFi UDebug
æT PROCEDURE
æC This routine is executed periodically by the Vertical Retrace Interrupt mechanism.
If the Command-Option-Shift-Control keys are held down, the MacApp debugger is
entered.
You never call this routine yourself.
æKY AWatchTask
æD PROCEDURE AWatchTask;
æFi UBusyCursor
æT PROCEDURE
æC AWatchTask changes the mouse pointer to the busy cursor (usually the watch
cursor).
MacApp calls this routine from the global routine BusyInstall. You usually do not
need to call this routine yourself.
æKY BlockSet
æD PROCEDURE BlockSet(destPtr: Ptr; byteCount: longint; setVal: UNIV SignedByte);
æFi UMacAppUtilities
æT PROCEDURE
æC BlockSet sets a block of memory to the specified value. The destPtr parameter
is the pointer to the block whose value is to be set. The byteCount parameter is
the size of the block to be set. The setVal parameter is the value to be stored
at each byte in the block of memory beginning with the destination address.
MacApp calls BlockSet from a variety of methods that manage memory. BlockSet is
provided for your convenience; you can use it to set a block of memory to a
specified value.
æKY BuildAllReserves
æD PROCEDURE BuildAllReserves;
æFi UMemory
æT PROCEDURE
æC BuildAllReserves creates the code reserve and low-space reserve. MacApp calls
BuildAllReserves when launching an application, when memory space is low, and
when checking the reserve space in memory. You never need to call this routine
yourself.
æKY BuildCodeReserve
æD PROCEDURE BuildCodeReserve(allocLim: LONGINT; fromGZ: BOOLEAN);
æFi UMemory
æT PROCEDURE
æC BuildCodeReserve frees the current code reserve, computes the amount of memory
actually needed, and then attempts to allocate the specified amount of code reserve
space, purging memory if necessary. If this routine cannot allocate as much
memory as is needed, it allocates as much as it can get.
The allocLim parameter specifies the largest amount of memory this call attempts
to allocate, regardless of the application's needs at the time. Set the fromGZ
parameter to TRUE if you want to steal memory from the grow zone; the value of fromGZ
is normally FALSE, since you must never purge or compact the grow zone.
MacApp calls BuildCodeReserve from several routines that allocate memory when an
application is launched. You never need to call this routine yourself.
æKY BuildMessage
æD FUNCTION BuildMessage(lowWord, highWord: INTEGER): LONGINT;
æFi UFailure
æT PROCEDURE
æC BuildMessage takes two integers and combines them into a single value of type
LongInt.
The lowWord parameter is the integer to be represented in the low-order word of
the new LongInt value; the highWord parameter is the integer to be represented
in the high-order word. Note that the low-order word is the first parameter.
MacApp never calls this routine; it is provided for your convenience. You can
use it in your failure-handling sequence when you want to replace the message
parameter used when signalling failure with a more appropriate message of your
own.
æKY BusyActivate
æD PROCEDURE BusyActivate(entering: BOOLEAN);
æFi UBusyCursor
æT PROCEDURE
æC BusyActivate activates or deactivates the busy-cursor mechanism. Set the
entering parameter to TRUE when you want to activate the busy-cursor mechanism;
set it to FALSE to deactivate the mechanism. MacApp calls BusyActivate when
passing control to a desk accessory or another process in the MultiFinder® environment.
You can call this routine when you want activate the busy cursor; for example, you
can do so to inform the user that the application is temporarily unable to respond
to user input.
æKY BusyDelay
æD PROCEDURE BusyDelay(newDelay: INTEGER);
æFi UBusyCursor
æT PROCEDURE
æC BusyDelay changes the amount of time that must elapse between accessing user
events before MacApp displays the busy cursor. BusyDelay calls BusyReset to examine
the state flags changeToWatch and inControl in the cursor information record.
The newDelay parameter is the new value of the delay time in ticks; a value less
than or equal to 0 does not change the delay time.
BusyDelay is called by the global routine BusyInstall when it installs the busy-cursor
mechanism. You can call BusyDelay when you want to change the delay time that
elapses before the watch cursor is displayed.
æKY BusyInstall
æD PROCEDURE BusyInstall;
æFi UBusyCursor
æT PROCEDURE
æC BusyInstall installs the busy-cursor mechanism; this routine installs the VBL
(vertical blanking) task AWatchTask and patches the traps GetNextEvent, EventAvail,
InitCursor, SetCursor, and SetCCursor (under A/UX, this routine also patches
StillDown and WaitMouseUp).
MacApp calls BusyInstall once during program initialization. You never need to
call this routine yourself.
æKY BusyRemove
æD PROCEDURE BusyRemove;
æFi UBusyCursor
æT PROCEDURE
æC BusyRemove removes the busy-cursor mechanism. It removes the VBL task and
removes patches from the traps GetNextEvent, EventAvail, InitCursor, SetCursor,
SetCCursor, and the A/UX traps.
MacApp calls BusyRemove once when terminating an application. You usually do not
need to call this routine yourself.
æKY BusyReset
æD PROCEDURE BusyReset(delayTicks: INTEGER);
æFi UBusyCursor
æT PROCEDURE
æC BusyReset resets the counter that specifies how much time has elapsed between
accesses to the user's input events. If the busy cursor is currently being displayed,
this routine restores the original cursor.
The delayTicks parameter is the new value of the busy-cursor delay, expressed in ticks.
MacApp calls BusyReset from several global routines that implement the busy-cursor
mechanism. You can call this routine when you wish to restore the cursor information
record to a known state.
æKY BusyTurnOff
æD PROCEDURE BusyTurnOff;
æFi UBusyCursor
æT PROCEDURE
æC BusyTurnOff sets the cursor information record (pCursorInfo) fields to indicate
that the cursor is not the busy cursor (the watch cursor).
MacApp calls BusyTurnOff from InitMacAppCursor, SetMacAppCursor and SetCMacAppCursor.
You can call this routine when you wish to display the standard cursor indicated
by the cursor information record; typically, this is the arrow cursor.
æKY CallAlertFilter
æD FUNCTION CallAlertFilter(theDialog: DialogPtr; VAR theEvent: EventRecord;
VAR itemHit: INTEGER; theAlertFilter: ProcPtr): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC CallAlertFilter allows you to call your own alert filter procedure and pass
its result to the global routine MacAppAlertFilter.
The parameter theDialog is a pointer to the specified dialog's item list. The parameter
theEvent is the Toolbox event record that caused this routine to be called. The itemHit
parameter specifies the control that was selected in the dialog box; in the case of an
alert dialog box, the OK button that dismisses the alert dialog box is usually the
control that was selected. The parameter theAlertFilter is a pointer to your own alert
filter procedure.
MacApp calls this routine from the global routine DoShowAboutAppFilter.
You can use this routine to provide your own alert filter behavior and pass it
on to the global routine MacAppAlertFilter.
æKY CallCapture
æD PROCEDURE CallCapture(textBuf: Ptr; byteCount: INTEGER; captureProc: ProcPtr);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallEnter
æD PROCEDURE CallEnter(entering: BOOLEAN; proc: Ptr);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallFileFilter
æD FUNCTION CallFileFilter(paramBlock: HParmBlkPtr; routine: ProcPtr): BOOLEAN;
æFi UMacApp.TApplication
æT PROCEDURE
æC This routine allows you to pass control to your own file filter procedure,
returning TRUE if that filter routine completes its task successfully.
The paramBlock parameter is a pointer to the file filter’s parameter block. The
routine parameter is a pointer to your file filter routine of the form:
FUNCTION MyFileFilter (paramBlock : HParmBlkPtr): BOOLEAN;.
MacApp calls CallFileFilter if your application class overrides TApplication.SFGetParms
to return the address of your file filter routine in the fileFilter parameter of
SFGetParms.
æKY CallFlagActionProc
æD FUNCTION CallFlagActionProc(OnOrOff: BOOLEAN; actionProc: ProcPtr): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallHelpProc
æD PROCEDURE CallHelpProc(actionProc: ProcPtr);
æFi UTranscriptView
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallInspector
æD PROCEDURE CallInspector(obj: TObject; inspector: Ptr);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallNotify
æD PROCEDURE CallNotify(h: Handle; routine: ProcPtr);
æFi UMemory
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallSymActionProc
æD FUNCTION CallSymActionProc(actionProc: ProcPtr): Handle;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallSymbolLookup
æD FUNCTION CallSymbolLookup(VAR sym: Str255; lookerUpper: Ptr): Longint;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You never need
to call it yourself.
æKY CallWDefProc
æD FUNCTION CallWDefProc(varCode: INTEGER; theWindow: WindowPtr;
message: INTEGER; param: LONGINT; wDefProc: UNIV Handle): LONGINT;
æFi UMacApp
æT PROCEDURE
æC CallWDefProc calls the specified window definition procedure with a variant code
and message, and returns the window definition procedure’s actual address.
The varCode parameter specifies the window definition procedure’s variation code if
there is one. The parameter theWindow specifies the Window Manager window whose
window definition procedure is to be accessed. The message parameter specifies
the operation that the window definition procedure is to perform. The wDefProc
parameter is a universal handle to the specified window definition procedure.
MacApp uses this routine to call the window definition procedure for a specified
Window Manager window associated with a TWindow object. You can use this routine
in a similar fashion. For more information about window definition procedures,
variation codes, and messages, see the Window Manager chapter of Inside Macintosh,
Volume I.
æKY CanPaste
æD PROCEDURE CanPaste(aClipType: ResType);
æFi UMacApp
æT PROCEDURE
æC CanPaste allows you to register the ability to paste the specified type of data.
The aClipType parameter indicates the resource type of the data your application
has the ability to paste. CanPaste stores data type you specify in the global
variable gPrefClipType.
MacApp calls this routine from TTEView.DoSetUpMenus to indicate the ability to paste
'TEXT' data using the Clipboard. You can call this routine to register with MacApp the
ability to paste any type of data your code can handle.
æKY CanReadLn
æD FUNCTION CanReadLn: Boolean;
æFi UMacAppUtilities
æT PROCEDURE
æC CanReadLn returns TRUE if DebugCanReadLn returns TRUE and the qDebug compile
switch is set to TRUE. That is, DebugCanReadLn checks the setup of the debugger,
and CanReadLn verifies that debugging code has been included. If the qDebug
switch is not set to TRUE, CanReadLn returns FALSE.CanReadLn is called by routines
that return information to the Debug Transcript. You usually do not need to call
this routine yourself.
æKY CanWriteLn
æD FUNCTION CanWriteLn: Boolean;
æFi UMacAppUtilities
æT PROCEDURE
æC CanWriteLn returns TRUE if DebugCanWriteLn returns TRUE and the qDebug compile
switch is set to TRUE. Thus, DebugCanWriteLn checks the setup of the debugger,
and CanWriteLn verifies that debugging code has been included. If the qDebug
switch is not set to TRUE, CanWriteLn does nothing. CanWriteLn is called by the
global routines Assertion and Failure. You usually do not need to call this
routine yourself.
æKY CatchFailures
æD PROCEDURE CatchFailures(VAR fi: FailInfo; PROCEDURE Handler(e:INTEGER;
m: LONGINT));EXTERNAL;
æFi UFailure
æT PROCEDURE
æC CatchFailures pushes the specified failure-handling routine onto the global
stack of such routines in MacApp.
The fi parameter is a failure information record that MacApp uses to return data in
case of a failure. The handler parameter is the procedure that is to be executed upon
the next failure.
MacApp uses CatchFailures in numerous places to post the handler routine for
each method that provides a failure handler. You can call this routine with an
appropriate handler routine when you create or initialize objects, execute commands,
modify views, or manipulate memory—in short, almost anytime you need to gracefully
exit a failed routine.
æKY CenterRectOnScreen
æD PROCEDURE CenterRectOnScreen(VAR aRect: Rect; horizontally, vertically,
forDialog: Boolean);
æFi UMacAppUtilities
æT PROCEDURE
æC CenterRectOnScreen centers the given rectangle on the main screen as specified.
The aRect parameter specifies the rectangle that is to be centered on the
screen in global coordinates; when this routine returns, the aRect parameter
contains the coordinates of the newly centered rectangle. Setting the horizontally
and vertically parameters to TRUE causes the specified rectangle to be centered
horizontally or vertically on the screen, respectively. If the value of the
forDialog parameter is TRUE, then the rectangle is placed closer to the top of
the screen, as a modal dialog box would be.
CenterRectOnScreen is called by several MacApp methods that display alert boxes and
dialog boxes that must be centered on the screen. You can use this routine to ensure
that your dialog boxes are centered regardless of screen size.
æKY CheckFreeMasters
æD PROCEDURE CheckFreeMasters;
æFi UDebug
æT PROCEDURE
æC CheckFreeMasters compares the number of master pointers allocated at startup
with the number of currently available master pointers; if the numbers differ,
this routine writes both values to the debug transcript.
MacApp calls this routine from the global routine MADebuggerMainEntry when you request
a report of the master pointer usage from the MacApp debugger. You can use this routine
when you want to check the number of free master pointers.
æKY CheckReserve
æD FUNCTION CheckReserve: BOOLEAN;
æFi UMemory
æT PROCEDURE
æC CheckReserve determines whether there is sufficient memory available for your
application's low-memory and code-segment reserves. If the reserves are adequate,
then this routine returns TRUE. If CheckReserve returns FALSE, your application
may fail due to lack of memory necessary to load a segment or system resource.
MacApp calls CheckReserve to test the adequacy of the low-memory and segment
reserves; reasons for this include verifying the success of a routine that creates
such a reserve and verifying failure as a means of gracefully exiting such a
call. You can use CheckReserve in a similar fashion.
æKY CheckRsrcUsage
æD PROCEDURE CheckRsrcUsage;
æFi UMemory
æT PROCEDURE
æC CheckRsrcUsage determines whether the total size of the set of currently
loaded resources exceeds the maximum value specified by gMaxLockedRsrc. If so,
the value of gMaxLockedRsrc is set to the new maximum value. If gRsrcReport is
TRUE, then the new maximum is reported in the Debug Transcript. If gMemMgtBreak
is set to TRUE, this routine halts program execution.
CheckRsrcUsage is used for debugging purposes only; MacApp calls it from the debugger
in response to your Show Heap Information command. CheckRsrcUsage is also called from
several other methods if the application is compiled with debugging code included.
æKY CleanupMacApp
æD PROCEDURE CleanupMacApp;
æFi UMacApp.Globals
æT PROCEDURE
æC CleanupMacApp unpatches all traps patched by MacApp, terminates the application,
removes the MacApp busy-cursor mechanism, and shuts down the debugger if that
code is present.
MacApp patches the toolbox trap ExitToShell to call CleanupMacApp when terminating an
application. You never call this routine yourself.
æKY ClearTheFPU
æD PROCEDURE ClearTheFPU;
æFi UMacApp.Globals
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY ClickLoopForTTEView
æD FUNCTION ClickLoopForTTEView: BOOLEAN;
æFi UTEView
æT PROCEDURE
æC ClickLoopForTTEView forwards mouse-down events to the current TTEView object’s
ClikLoop method. ClickLoopForTTEView always returns TRUE; if the events are
processed by TTEView.ClikLoop, that method returns TRUE if the mouse button is
still pressed when ClikLoop finishes executing.
You usually do not need to call this routine yourself.
æKY CloseFile
æD FUNCTION CloseFile(dataRefnum, rsrcRefnum: INTEGER): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC CloseFile closes a file's data and resource forks. If it is successful, this
routine returns noErr; otherwise it returns an error from the file system or the
Resource Manager.
The dataRefNum parameter is the reference number of the data fork to be closed.
If the value of dataRefnum is kNoFileRefnum, the data fork is not closed. Similarly,
the rsrcRefnum parameter is the reference number of the resource fork to be closed; if
the value of rsrcRefNum is kNoFileRefnum, the resource fork is not closed.
MacApp calls CloseFile from several TDocument methods that manipulate files. You can
use this routine to close either fork of an open file. Note that it is preferable to
use the TDocument.Close method to close user documents, because it provides error
checking and user alert messages that this routine does not provide.
æKY ClrBreakCmd
æD PROCEDURE ClrBreakCmd;
æFi UDebug
æT PROCEDURE
æC ClrBreakCmd displays prompts in the MacApp debugger and clears the breakpoints
specified by responses to the prompts. MacApp calls this routine in response to
a Clear Breakpoints command entered in the MacApp debugger.
This routine is used internally by MacApp; you never need to call it yourself.
æKY CmdEnabled
æD FUNCTION CmdEnabled(cmd: CmdNumber): BOOLEAN;
æFi UMenuSetup
æT PROCEDURE
æC CmdEnabled returns TRUE if the specified command is enabled.
The cmd parameter is the command number of the command being tested.
MacApp calls CmdEnabled from TApplication.DoKeyCommand to filter out keyboard
commands that are equivalent to disabled menu items. You can use this routine to
determine whether a menu command is enabled.
æKY CmdFromMenuItem
æD FUNCTION CmdFromMenuItem(menu, item: INTEGER): CmdNumber;
æFi UMenuSetup
æT PROCEDURE
æC CmdFromMenuItem returns the command number for the specified menu ID and item
number.
The menu parameter is the ID of the menu containing the specified command.
The item parameter is the command's menu item number. If the item number is
positive, CmdFromMenuItem searches the command table for the specified menu and
item pair. If the pair is found, the corresponding command number in the table
is returned. If the pair is not found, CmdFromMenuItem returns a number equal to
-(256 * menu + item). If the item number is negative, this routine returns the
negative value of the item.
MacApp calls CmdFromMenuItem to obtain a command number that it passes to
TApplication.DoMenuCommand when the user selects a menu item. DoMenuCommand then
executes the command selected by the user. You usually do not need to call this routine
yourself.
æKY CmdToComponents
æD FUNCTION CmdToComponents(cmd: CmdNumber; VAR menuNo, itemNo: integer): MenuHandle;
æFi UMenuSetup
æT PROCEDURE
æC CmdToComponents calls CmdToMenuItem to get the menu ID and item number of the
specified command, and returns the handle to the menu in which the command resides.
If the specified command does not exist, this routine returns NIL.
The cmd parameter is the command number of the command. The menuNo parameter
contains the command’s menu ID when this routine returns. The itemNo parameter
contains the command’s menu item number when this routine returns. If the command
cannot be found, this routine sets the menuNo and itemNo parameters to zero when
it returns.
MacApp calls CmdToComponents from methods that set up menus and enable or disable
menu commands. You can use this routine to obtain a command’s menu number and
item number.
æKY CmdToMenuItem
æD PROCEDURE CmdToMenuItem(aCmd: CmdNumber; VAR menu, item: INTEGER);
æFi UMenuSetup
æT PROCEDURE
æC CmdToMenuItem returns the menu ID and item number of the specified command.
The aCmd parameter is the command number of the command whose menu ID and item
number are to be returned. The menu parameter is the command's menu ID and the
item parameter is the command's item number in the menu. If the value of aCmd is
positive, CmdToMenuItem searches the command table and returns the menu ID and
item number corresponding to aCmd. If the value of aCmd is not found, the menu
and item parameters are both set to 0. If the value of aCmd is negative, the
menu number is the upper 8 bits, and the item number the lower 8 bits, of the
absolute value of aCmd. (Therefore, menu IDs must be less than or equal to 127
and item numbers must be less than or equal to 255.)
MacApp calls CmdToMenuItem from several global routines that implement command
handling. You can call this routine when you need to obtain the nenu ID and item
number for a specified command number.
æKY CmdToName
æD PROCEDURE CmdToName(aCmd: CmdNumber; VAR menuText: Str255);
æFi UMenuSetup
æT PROCEDURE
æC CmdToName returns the specified command's menu item text.
The aCmd parameter is the command number of the specified command. The menuText
parameter contains the command's menu item text when the routine returns.
MacApp calls CmdToName when creating the About menu item in the Apple menu if
your application's About menu contains ^0' or when it customizes menu items such
as Undo with the name of the command to be undone. This routine is also used by
the MacApp debugger to report command names. You can use CmdToName in a similar
fashion.
æKY CompareStrings
æD FUNCTION CompareStrings(first, second: Str255): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC The CompareStrings routine ranks two strings based on which one comes first
in an alphabetic list based on the ordering of the ASCII character set.
The parameters first and second are the first and second strings to be compared,
respectively. This routine returns -1 if the first string is ranked before the
second string, zero if the two strings are identical, and 1 if the second string
is ranked before the first string.
MacApp calls CompareStrings from the global routine GetClassIDFromName; it compares
the specified string to each item in a list of class names and returns the class
ID of the string that matches the one specified. You can use this routine to
sort two strings alphabetically or find a match for a specified string.
æKY ConcatNumber
æD FUNCTION ConcatNumber(aString: Str255; aNumber: LONGINT): Str255;
æFi UMacAppUtilities
æT PROCEDURE
æC ConcatNumber returns a string that is the concatenation of the specified
string with a string value representing the specified number.
The aString parameter is the string that is to be concatenated with the number.
The aNumber parameter is a number that is to be appended to the string aString.
MacApp most often calls ConcatNumber as a means of converting numeric values for
display in the MacApp debugger. You can call this routine to convert numeric
values to text strings.
æKY ConfigRecFields
æD PROCEDURE ConfigRecFields(aTitle: Str255; VAR aConfigRec: ConfigRecord;
PROCEDURE DoToField(fieldName: Str255; fieldAddr:Ptr;
fieldType: INTEGER));
æFi UMacAppUtilities
æT PROCEDURE
æC ConfigRecFields reports the contents of the configuration record's fields to
the MacApp Inspector.
The aTitle parameter specifies the name of the configuration record to be shown
in the Inspector and MacApp debugger. The aConfigRec parameter specifies the
configuration record whose fields to be listed. DoToField is a procedure that
MacApp passes to ConfigRecFields to report the contents of each field. ConfigRecFields
iterates over all the configuration record's fields, performing DoToField on
each one. In this way ConfigRecFields reports the contents of each field to the
Inspector.
MacApp calls ConfigRecFields from the MacApp Inspector. You usually do not call
this routine.
æKY CopyStr255
æD PROCEDURE CopyStr255(VAR fmStr: Str255; toAddr: UNIV Ptr);
æFi UMacAppUtilities
æT PROCEDURE
æC CopyStr255 copies a string to a specified address. The routine is more efficient
than a direct assignment (myString := aString) because only the required bytes
are copied rather than the whole array.
The fmStr parameter is the string to be copied. The toAddr parameter is the
address to which the string is copied.
MacApp calls CopyStr255 when retrieving the contents of a static text field or a
button. You can use CopyStr255 to copy string data to a specified destination
address.
æKY CurrentCursor
æD PROCEDURE CurrentCursor(VAR C: Cursor);
æFi UDebug
æT PROCEDURE
æC CurrentCursor returns a copy of the current cursor record.
The C parameter contains a copy of the current cursor record when this routine returns.
MacApp never calls CurrentCursor; it is provided for your convenience. You can use it
to obtain a copy of the current cursor record.
æKY DebugCanReadLn
æD FUNCTION DebugCanReadLn: BOOLEAN;
æFi UDebug
æT PROCEDURE
æC DebugCanReadLn returns TRUE if you can retrieve information with a ReadLn
statement, usually from the Debug Transcript window.
MacApp calls DebugCanReadLn from the global routine CanReadLn to see if debugging
code has been configured in a way that allows the debugger to retrieve information
from the transcript window. You usually do not need to call this routine yourself.
æKY DebugCanWriteLn
æD FUNCTION DebugCanWriteLn: BOOLEAN;
æFi UDebug
æT PROCEDURE
æC DebugCanWriteLn returns TRUE if you can redirect the writeln statements to a
window, usually the Debug Transcript window.
MacApp calls this routine from the global routine CanWriteLn to see if debugging
code has been configured in a way that allows the debugger to write to a window.
You usually do not need to call this routine yourself.
æKY DebugCapture
æD FUNCTION DebugCapture(captureProc: ProcPtr): ProcPtr;
æFi UDebug
æT PROCEDURE
æC DebugCapture installs an alternative capture procedure that is called for
every call to the standard Pascal procedure WriteLn. The new capture procedure
should have the same interface as TTranscriptView.AddText. You can set the value
of gWrToWindow to FALSE if you want to inhibit output to the window.
The captureProc parameter is a pointer to your alternate capture procedure. To
remove the capture procedure, set the value of this parameter to NIL.
MacApp calls this routine from the debugger. You can use it to install an alternative
capture procedure for calls to the global routine DebugWriteLn.
æKY DebugEndForce
æD PROCEDURE DebugEndForce;
æFi UDebug
æT PROCEDURE
æC DebugEndForce stops debugging output from being forced to the Debug Transcript
and log files.
DebugEndForce is called by several global routines that interact with the MacApp
debugger. You usually do not need to call this routine yourself.
æKY DebugException
æD PROCEDURE DebugException(errorCode: INTEGER);
æFi UDebug
æT PROCEDURE
æC DebugException, if you compile with the debugging code installed, writes
messages to the Debug Transcript for 68000 exceptions (code 901–910) and SysError
calls.
The errorCode parameter is the 68000 exception or SysError call that caused
DebugException to be called.
This routine is called only by the Macintosh® system. You never need to call it
yourself.
æKY DebugFlag
æD PROCEDURE DebugFlag(flagAddr: PBOOLEAN; flagChar: CHAR; theActionProc: ProcPtr;
flagDesc: StringPtr);
æFi UDebug
æT PROCEDURE
æC DebugFlag registers a Boolean flag for a specified external debugger command.
The flagAddr parameter is the address of the flag. The flagChar parameter is the
character you use in the debugger to switch the flag on or off. DebugFlag does
not check for duplicate flag characters. The parameter theActionProc is a pointer
to a procedure that changes the flag. This pointer can be set to NIL if no such
procedure is necessary. The flagDesc parameter is a pointer to a string describing
the flag.
DebugFlag is called several times from the global routine InitUDebug to set up
the standard set of commands for the MacApp debugger. You never call this routine
yourself.
æKY DebugForceOutput
æD PROCEDURE DebugForceOutput(DebugToWindow, DebugToFile: DebugForceOptions);
æFi UDebug
æT PROCEDURE
æC DebugForceOutput forces MacApp to write out diagnostic information to the
Debug Transcript or to a log file.
The DebugToWindow and DebugToFile parameters are options that allow you to use
the Pascal WriteLn procedure for a window or a document, respectively. Valid
values are forceOn, forceOff, and forceUnchanged. If the value of DebugToWindow
is not forceUnchanged, MacApp sets the value of the field fWrToWindow to the
Boolean value of the expressionDebugToWindow = WrForceOnThe DebugToFile parameter
sets the value of fWrToFile similarly; if the value of DebugToFile is not
forceUnchanged, MacApp sets the value of the field fWrToFile to the Boolean value
of the expression DebugToFile = WrForceOn.
DebugForceOutput is called by several methods that interact with the MacApp
debugger. You usually do not need to call this routine yourself.
æKY DebugGetActiveDocument
æD FUNCTION DebugGetActiveDocument: TDocument;
æFi UDebug
æT PROCEDURE
æC DebugGetActiveDocument returns the document object associated with the application's
active window, ignoring the Debug Transcript window even if it happens to be
active.
DebugGetActiveDocument is called by the global routine InitUDebug when initializing
the MacApp debugger.
æKY DebugGetActiveWindow
æD FUNCTION DebugGetActiveWindow: TWindow;
æFi UDebug
æT PROCEDURE
æC DebugGetActiveWindow returns the TWindow object that is the application's
active window, ignoring the Debug Transcript window even if it happens to be
active.
DebugGetActiveWindow is called by some of the MacApp global debugging
routines. You usually do not need to call this routine yourself.
æKY DebugGetLastCommand
æD FUNCTION DebugGetLastCommand: TCommand;
æFi UDebug
æT PROCEDURE
æC DebugGetLastCommand returns the TCommand object created to execute the most
recent complex command if the application state has been saved in pSavedState;
otherwise, this routine returns NIL.
MacApp calls DebugGetLastCommand when initializing the MacApp debugger. This
routine is intended for MacApp’s internal use; you never need to call it yourself.
æKY DebugGlobalHandle
æD PROCEDURE DebugGlobalHandle(globAddr: Ptr; theActionProc: ProcPtr;
globSym: PMAName);
æFi UDebug
æT PROCEDURE
æC DebugGlobalHandle registers the symbol name of a global variable that contains
a handle. The letters in the name can be uppercase or lowercase. The value the
global variable contains must be of type Handle.
The globAddr parameter is the address of the variable to be registered. The
parameter theActionProc is a pointer to a routine that can be called to derive
the handle. The globSym parameter is a string that contains the name of the
variable.
MacApp calls DebugGlobalHandle from the global routine InitUDebug when initializing
the MacApp debugger. You usually do not need to call this routine yourself.
æKY DebugPerfMonitor
æD FUNCTION DebugPerfMonitor(turnOn: BOOLEAN): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC DebugPerfMonitor turns MacApp’s performance-monitoring features on and off if
they are installed.
Set the turnOn parameter to TRUE if performance monitoring is to be enabled, and
to FALSE if it is to be disabled.
DebugPerfMonitor is called only in certain cases when the qDebug or qPerform
compile switch is set to TRUE. You usually do not need to call this routine
yourself.
æKY DebugReadCh
æD FUNCTION DebugReadCh: CHAR;
æFi UDebug
æT PROCEDURE
æC DebugReadCh reads the command line input from the Debug Transript and returns
it to the debugger.
DebugReadCh is called by several global routines used to implement the MacApp
debugger. You usually do not need to call this routine yourself.
æKY DebugReadLn
æD FUNCTION DebugReadLn(buffer: Ptr; byteCount: INTEGER): Longint;
æFi UDebug
æT PROCEDURE
æC DebugReadLn reads characters from the Debug Transcript into a text buffer
until it encounters a return or reads the number of bytes specified to the length
of a single line.
The buffer parameter is a pointer to the text buffer into which this routine
stores characters. The byteCount parameter specifies the number of bytes in a
single line of text.
DebugReadLn is called once by the global routine InstallWriteLnHook when MacApp
is setting up the debugger. You usually do not need to call this routine yourself.
æKY DebugRedirect
æD FUNCTION DebugRedirect(vRefnum: INTEGER; fileName: StringPtr): OSErr;
æFi UDebug
æT PROCEDURE
æC DebugRedirect redirects the MacApp debugger’s diagnostic output to a specified
file, returning an operating-system error to indicate success or failure.
The vRefnum parameter is the volume reference number of the disk that contains
the output file. The fileName parameter is a string that contains the pathname
of the output file.
MacApp calls this from TTranscriptView.Redirect when the user enables or terminates
redirection of debug output. You usually do not need to call this routine yourself.
æKY DebugShowTranscriptWindow
æD PROCEDURE DebugShowTranscriptWindow;
æFi UDebug
æT PROCEDURE
æC DebugShowTranscriptWindow opens the Debug Transcript window.
MacApp calls DebugShowTranscriptWindow when the user enters the MacApp debugger
while the Debug Transcript window is closed or chooses the Show Debug Window
menu item. You usually do not need to call this routine yourself.
æKY DebugTerminate
æD PROCEDURE DebugTerminate;
æFi UDebug
æT PROCEDURE
æC DebugTerminate shuts down and disables the MacApp Debugger. Once DebugTerminate
is called the application can no longer open the Debug Transcript window or
execute commands from the Debug menu.
MacApp calls DebugTerminate from the global routine CleanupMacApp when it terminates
an application that was compiled with debugging code included. You usually do
not need to call this routine yourself.
æKY DebugTranscriptWidth
æD FUNCTION DebugTranscriptWidth: INTEGER;
æFi UDebug
æT PROCEDURE
æC DebugTranscriptWidth returns the number of characters per line in the current
transcript window.
The MacApp debugger calls DebugTranscriptWidth from the global routine InspectField.
You usually do not need to call this routine yourself.
æKY DebugWriteLn
æD PROCEDURE DebugWriteLn(textBuf: Ptr; byteCount: INTEGER);
æFi UDebug
æT PROCEDURE
æC DebugWriteLn adds text to the debug view.
The textBuf parameter is a pointer to the text to be added to the transcript
view. The byteCount parameter is the number of bytes to be written from the text
buffer.
MacApp installs DebugWriteLn as the console device writeLn procedure from the
global routine InstallWriteLnHook when opening an application compiled with
debugging code included. You usually do not need to call this routine yourself.
æKY DefaultSize
æD PROCEDURE DefaultSize(VAR theSize: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC The purpose of this routine is to convert a font size to portable form. The
DefaultSize routine considers a font size of zero to be the portable equivalent
to the system font size.
The parameter theSize is the application's default font size. If theSize is
equal to the system font size then this routine sets the parameter theSize to 0.
Otherwise it is left unchanged.
MacApp calls DefaultSize to accomplish part of the task of the global routine
GetPortFontInfo. You can use this routine to compare your default font size with
that of the system running the application.
æKY DefineConfiguration
æD PROCEDURE DefineConfiguration(VAR configuration: ConfigRecord);
æFi UMacAppUtilities
æT PROCEDURE
æC DefineConfiguration gets information about the host machine's configuration
and stores it in the configuration record.
The configuration parameter is the configuration record.
MacApp calls DefineConfiguration from the global routine DoRealInitToolBox when
opening an application. You can access the current configuration in the global
variable gConfiguration.
æKY DeleteFile
æD FUNCTION DeleteFile(namePtr: StringPtr; volRefnum: INTEGER): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC DeleteFile deletes the specified file and returns an operating system error
indicating success or failure.
The namePtr parameter is a string pointer to the file's pathname. The volRefnum
parameter is the volume reference number, which indicates the volume on which
the file to be deleted resides.
MacApp calls DeleteFile from several TDocument methods that manipulate files.
You can call this routine to delete a specific file.
æKY DevClose
æD FUNCTION DevClose(fdesc: IEFRefNum): Longint; C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DevFAccess
æD FUNCTION DevFAccess(fName: UNIV IEFilePathPtr; opCode: Longint;
arg: UNIV Longint): Longint; C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DevIoctl
æD FUNCTION DevIoctl(fdesc: IEFRefNum; request: Longint;
arg: UNIV Longint): Longint; C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DevRead
æD FUNCTION DevRead(fdesc: IEFRefNum; bufp: UNIV Longint;
count: Longint): Longint; C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DevWrite
æD FUNCTION DevWrite(fdesc: IEFRefNum; bufp: UNIV Longint;
count: Longint): Longint; C; EXTERNAL;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DisciplineMethodCalls
æD FUNCTION DisciplineMethodCalls(discipline: BOOLEAN): BOOLEAN;
æFi UObject
æT PROCEDURE
æC DisciplineMethodCalls turns method discipline on and off. Method discipline
is a MacApp feature that verifies that the object being dispatched against is
actually an object.
Set the discipline parameter to TRUE if method discipline is to be turned on;
set it to FALSE if method discipline is to be turned off.
MacApp calls DisciplineMethodCalls from the global routine InitUDebug when setting
up the MacApp debugger and from the global routine WithHideFromMacAppDo when
method discipline is enabled. You usually do not need to call this routine yourself.
æKY DisposeIfHandle
æD FUNCTION DisposeIfHandle(aHandle: UNIV Handle): Handle;
æFi UMacAppUtilities
æT PROCEDURE
æC DisposeIfHandle disposes of the specified handle only if it is not NIL or not
a resource handle; this routine is identical to the global routine DisposIfHandle
except that this routine also returns a NIL handle for the convenience of the
caller.
The aHandle parameter is the handle to be freed.
MacApp calls this routine whenever a handle is to be freed. You can use this
routine to dispose of a handle.
æKY DisposeIfPtr
æD FUNCTION DisposeIfPtr(aPtr: UNIV Ptr): Ptr;
æFi UMacAppUtilities
æT PROCEDURE
æC DisposeIfPtr disposes of the specified pointer only if it is not NIL; this
routine is identical to the global routine DisposIfPtr except that this routine
returns a NIL pointer for the convenience of the caller.
The aPtr parameter is the pointer to be freed.
You can use this routine to dispose of a pointer.
æKY DisposIfHandle
æD PROCEDURE DisposIfHandle(aHandle: UNIV Handle);
æFi UMacAppUtilities
æT PROCEDURE
æC DisposIfHandle disposes of the specified handle only if it is not NIL.
The aHandle parameter is the handle to be freed.
MacApp calls this routine from several methods that free memory. You can use
this routine to dispose of a handle.
æKY DisposIfPtr
æD PROCEDURE DisposIfPtr(aPtr: UNIV Ptr);
æFi UMacAppUtilities
æT PROCEDURE
æC DisposIfPtr calls DisposeIfPtr to dispose of the specified pointer only if it
is not NIL.
The aPtr parameter is the pointer to be freed.
You can use this routine to dispose of a pointer.
æKY DoChangeReserve
æD PROCEDURE DoChangeReserve(alter: BOOLEAN; VAR codeReserve, codeShort,
lowSpaceReserve: LONGINT; VAR gotCode, gotLowSpace: BOOLEAN);
æFi UMemory
æT PROCEDURE
æC DoChangeReserve changes the size and possibly the location of the MacApp
code-segment reserve in memory.
The value of the alter parameter is TRUE if the code reserve is to be changed.
The codeReserve parameter contains the old address of the reserve when the routine
is called, and contains the address of the new reserve when it returns. The
codeShort parameter specifies the amount of RAM by which the reserve fell short
if the full amount requested could not be allocated. The lowSpaceReserve parameter
contains the old address of the low-space reserve when the routine is called,
and contains the address of the new reserve when it returns. The routine returns
TRUE for the parameters gotCode and gotLowSpace if the routine was able to allocate
new reserves.
DoChangeReserve is called by the MacApp debugger. You usually do not need to
call this routine yourself.
æKY DoFailure
æD PROCEDURE DoFailure(pf: FailInfoPtr); EXTERNAL;
æFi UFailure
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY DoInitUMacApp
æD PROCEDURE DoInitUMacApp;
æFi UMacApp
æT PROCEDURE
æC DoInitUMacApp initializes MacApp, sets the values of several MacApp global
variables, and calls a few low-level routines when the application starts up.
MacApp calls DoInitUMacApp when your application calls InitUMacApp. You never
need to call DoInitUMacApp yourself.
æKY DoInitUMemory
æD PROCEDURE DoInitUMemory(VAR sizeTempReserve, sizeLowSpaceReserve: Size);
æFi UMemory
æT PROCEDURE
æC DoInitUMemory does most of the actual work of initializing MacApp memory
management. It sets memory management globals, computes the sizes of the grow
zone and the code reserve, creates a list of code segment handles, and sets the
size of the stack.
The sizeTempReserve parameter contains the size of the code reserve when this
routine returns. The sizeLowSpaceReserve parameter contains the size of the
low-space reserve when this routine returns.
MacApp calls DoInitUMemory from the global routine InitUMemory so that InitUMemory
can be in the main segment and this code can be in another segment. You usually
do not need to call this routine yourself.
æKY DoneViewRsrc
æD PROCEDURE DoneViewRsrc(viewRsrc: UNIV Handle; lastPtr: UNIV LONGINT);
æFi UMacApp
æT PROCEDURE
æC DoneViewRsrc reduces the size of the specified handle to the proper length,
according to the value of the lastPtr parameter.
The viewRsrc parameter is a handle to a 'view' resource that is being created
from a template; it is the handle to be resized. The lastPtr parameter is the
address of the next template entry.
MacApp does not call this routine; it is provided for your convenience.
You can call it to optimize the size of 'view' resources.
æKY DoneWithTempRgn
æD PROCEDURE DoneWithTempRgn;
æFi UMacApp
æT PROCEDURE
æC DoneWithTempRgn indicates that the variable gTempRgn is no longer in use. Use
of this routine and its counterpart, the global routine UseTempRgn, ensures that
two routines do not try to use gTempRgn at the same time.
MacApp calls DoneWithTempRgn after it finishes using gTempRgn. You can use this
routine in a similar fashion. Since this routine calls the global routine ProgramBreak,
you can call this only if the value of the qDebug flag is TRUE.
æKY DoRealInitToolBox
æD PROCEDURE DoRealInitToolBox;
æFi UMacAppUtilities
æT PROCEDURE
æC DoRealInitToolBox does the actual work of initializing the Toolbox after the
global routine InitToolBox ensures that there is enough memory to do so.
MacApp calls DoRealInitToolBox from the global routine InitToolBox so that InitToolBox
can be in the main segment and this code can be in another segment. You never
call this routine yourself.
æKY DoShowAboutAppFilter
æD FUNCTION DoShowAboutAppFilter(theDialog: DialogPtr; VAR theEvent: EventRecord;
VAR itemHit: INTEGER): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC DoShowAboutAppFilter filters out all events except those caused by the Return
or Enter keystrokes that cause the About box to be dismissed.
The parameter theDialog is a pointer to the specified dialog box's item list.
The parameter theEvent is the event in the Toolbox event record that caused this
routine to be called. The itemHit parameter specifies the control that was selected
in the dialog box; in the About box, it is is usually a click on the OK button
that dismisses the About box.
The Dialog Manager calls DoShowAboutAppFilter when displaying the application's
About box in TApplication.DoShowAboutApp. You never call this routine yourself.
æKY DoToSubView
æD PROCEDURE DoToSubView(view: TView);
æFi UDebug
æT PROCEDURE
æC DoToSubView adds a view and its subviews to the Inspector's list of active
objects.
The view parameter is the view to be added to the Inspector list.
MacApp calls DoToSubView to add the Debug Transcript to the Inspector only when
the qDebugTheDebugger flag is set to TRUE. You usually do not need to call this
routine yourself.
æKY DoWaiting
æD PROCEDURE DoWaiting;
æFi UDebug
æT PROCEDURE
æC DoWaiting handles key-down events from the MacApp debugger's command line,
executing the proper code in response to debugger commands.
DoWaiting is called from the global routine MADebuggerMainEntry when the debugger
is activated. You usually do not need to call this routine yourself.
æKY DumpTERecord
æD PROCEDURE DumpTERecord(aTEH: TEHandle);
æFi UTEView
æT PROCEDURE
æC DumpTERecord displays salient information about the TERecord in the Debug
Transcript.
The aTEH parameter is a handle to the TERecord object.
MacApp calls this routine from TTECutCopyCommand.DoIt if the values of qDebugging
and pTEIntenseDebugging are both TRUE. You can use this routine to debug routines
that use the TERecord.
æKY DumpTTECommand
æD PROCEDURE DumpTTECommand(theTTECommand: TTECommand);
æFi UTEView
æT PROCEDURE
æC DumpTTECommand displays information about a specified TTECommand object in
the Debug Transcript.
The parameter theTTECommand is the command object that the information pertains to.
DumpTTECommand is called by a variety of methods in classes TTETypingCommand,
TTECommand, TTEStyleCommand, and TTECutCopyCommand when the qDebug flag is set
to TRUE. You can call this routine to debug text-editing commands.
æKY EachClassDo
æD PROCEDURE EachClassDo(PROCEDURE DoToClass(theClass: ObjClassId));
æFi UObject
æT PROCEDURE
æC EachClassDo performs the procedure DoToClass once for each class defined in
the application.
DoToClass is a procedure that is defined separately. It can have any name, but
must accept the argument specified in the interface to EachClassDo. The parameter
theClass is bound to each class on which the procedure passed in DoToClass is to
operate.
EachClassDo is called by MacApp when it needs to perform an action on all of an
application's classes. You can use this routine in a similar fashion.
æKY EachFailureHandlerDo
æD PROCEDURE EachFailureHandlerDo(PROCEDURE DoToHandler(fiPtr: FailInfoPtr));
æFi UFailure
æT PROCEDURE
æC EachFailureHandlerDo calls DoToHandler for each failure handler in the linked
list of failure handlers from gTopHandler to the outermost handler.
The DoToHandler procedure is a procedure you define that takes a single parameter
of type FailInfoPtr as its argument. It can have any name, but must accept the
argument specified in the interface to EachFailureHandlerDo. The fiPtr parameter
is a pointer to a record of type FailInfoPtr that contains information used by
the exception-handling mechanism. The fiPtr parameter is bound to each handler
on which the procedure passed in DoToHandler is to operate. The FailInfoPtr
record type is defined in the unit UFailure.p.
EachFailureHandlerDo is called by the global routine HandlerExists when testing
the validity of failure handlers. You usually do not need to call this routine
yourself.
æKY EachFrameDo
æD PROCEDURE EachFrameDo(calleeFrame, ppc: Longint;
PROCEDURE DoToFrame(calleeFrame: Longint; ppc: Longint; callerFrame: Longint;
itsFrame: Longint));
æFi UDebug
æT PROCEDURE
æC EachFrameDo calls the procedure DoToFrame once for each frame on the stack.
DoToFrame is a procedure that you define separately. It can have any name, but
must accept the argument specified in the interface to EachFrameDo. The calleeFrame
parameter is the frame on which DoToFrame operates. This parameter is bound to
each frame on which the procedure passed in DoToFrame is to operate. The ppc
parameter is the current address in the program counter register. The callerFrame
parameter is the stack frame from which this routine was called. The itsFrame
parameter is a counter that this routine uses to determine when it has iterated
over all of the frames in the stack.
EachFrameDo is called by the global routine UnloadAllSegments only when the
qDebug flag is set to TRUE. You can use it to perform an operation on every
frame in the stack.
æKY EachMenuDo
æD PROCEDURE EachMenuDo(PROCEDURE DoToMenu(aMenuHandle: MenuHandle;
isHierarchical: Boolean); includeHierarchical: Boolean);
æFi UMenuSteup
æT PROCEDURE
æC EachMenuDo calls DoToMenu for each menu that has an ID in the range 0 to
mLastMenu (in MacApp 2.0, mLastMenu is equal to 63), including hierarchical and
pop-up menus if specified. This routine handles the Debug menu as a special
case.
DoToMenu is a procedure that you define separately. It can have any name, but
must accept the argument specified in the interface to EachMenuDo. The aMenuHandle
parameter is bound to each menu handle on which the procedure passed in DoToMenu
is to operate. The isHierarchical parameter is used to indicate to your DoToMenu
routine that the menu is a hierarchical or pop-up menu. If the value of the
includeHierarchical parameter is to TRUE, EachMenuDo includes hierarchical and
pop-up menus in its iteration over all menu handles.
EachMenuDo is called by the global routine PerformMenuSetup when the state of
the menus changes. You usually do not need to call this routine yourself.
æKY EachPatchDo
æD PROCEDURE EachPatchDo (FUNCTION DoToPatch(thePatchPtr: TrapPatchPtr): BOOLEAN);
æFi UPatch
æT PROCEDURE
æC EachPatchDo performs the DoToPatch function on each patch in the trap patch
list.
The DoToPatch function is a function you define that can have any name, but
must take a single parameter of type TrapPatchPtr as its argument. The DoToPatch
function should return TRUE when EachPatchDo should exit. The parameter thePatchPtr
is a pointer to the trap patch list.
You never need to call this routine yourself.
æKY EachSubClassDo
æD PROCEDURE EachSubClassDo(testClass: ObjClassId;
PROCEDURE DoToClass(theClass: ObjClassId));
æFi UObject
æT PROCEDURE
æC EachSubClassDo calls the procedure DoToClass once for each subclass of the
specified class.
The testClass parameter is the class whose subclasses are to be processed. DoToClass
is a procedure that you define separately. It can have any name, but must accept
the argument specified in the interface to this routine. The parameter theClass
is bound to each class on which the procedure passed in DoToClass is to operate.
EachSubClassDo is called by TObject.ForAllSubClassesDo when MacApp needs to
perform an operation on all classes defined in an application. (Remember, all
classes are descended from TObject.) You can use this routine in similar fashion.
æKY EachSuperClassDo
æD PROCEDURE EachSuperClassDo(testClass: ObjClassId;
PROCEDURE DoToClass(theClass: ObjClassId));
æFi UObject
æT PROCEDURE
æC EachSuperClassDo calls the procedure DoToClass once for each superclass of
the specified class.
The testClass parameter specifies the class whose superclasses are to be processed.
DoToClass is a procedure that is defined separately. It can have any name, but
must accept the argument specified in the interface to this routine. The parameter
theClass is bound to each class on which the procedure passed in DoToClass is to
operate.
EachSuperClassDo is called by TObject.ForAllSuperClassesDo when MacApp needs to
perform an operation on all of a class's superclasses. You can use this routine
in a similar fashion.
æKY EachWMgrWindowDo
æD PROCEDURE EachWMgrWindowDo(PROCEDURE DoToWMgrWindow(theWMgrWindow: WindowPtr));
æFi UMacAppUtilities
æT PROCEDURE
æC EachWMgrWindowDo performs the DoToWMgrWindow procedure on each Window Manager
window in the window list, starting at the frontmost window.
The parameter theWMgrWindow is typically a pointer to the Window Manager window
associated with a TWindow object, but the windows in the window list do not have
to be MacApp windows. DoToWMgrWindow is a procedure that you define separately.
It can have any name, but must accept the argument specified in the interface to
EachWMgrWindowDo. The parameter theWMgrWindow is bound to each window pointer on
which the procedure passed in DoToWMgrWindow is to operate.
EachWMgrWindowDo is called by several methods that manage windows. You can call
this routine when you wish to perform some operation on all of the windows in
the window list.
æKY EmptyVRect
æD FUNCTION EmptyVRect(r: VRect): BOOLEAN;
æFi UViewCoords
æT PROCEDURE
æC EmptyVRect returns TRUE if the specified view rectangle is empty.
The r parameter is the view rectangle to be tested.
MacApp does not call this utility routine; it is provided for your convenience.
You can call it to determine if a specified view rectangle is empty.The r parameter
is the view rectangle to be tested.
æKY Enable
æD PROCEDURE Enable(aCmd: CmdNumber; canDo: BOOLEAN);
æFi UMenuSetup
æT PROCEDURE
æC The Enable routine enables menu items for commands that can be executed at
the time the routine is called; it disables them if the command cannot be executed.
The aCmd parameter is the command number whose menu item is to be enabled or
disabled. The value of the canDo parameter is TRUE if the command can be executed
when Enable is called, or FALSE if not.
Enable is called from several command-handling and menu-setup routine. You usually
call this routine in your overrides of DoSetupMenus to enable menu items that
can be executed.
æKY EnableCheck
æD PROCEDURE EnableCheck(aCmd: CmdNumber; canDo, checkIt: BOOLEAN);
æFi UMenuSetup
æT PROCEDURE
æC EnableCheck enables menu items for commands that can be executed at the time
the routine is called; it disables them if the command cannot be executed. This
routine places a check mark to the left of enabled items if the checkIt parameter
is TRUE.
The aCmd parameter is the command number whose menu item is to be enabled or
disabled. The value of the canDo parameter is TRUE if the command can be executed
when EnableCheck is called. The checkIt parameter is TRUE if the command is to
be marked with a check.
EnableCheck is called from TApplication.SetupTheMenus when the qDebug flag is
TRUE; it places a check mark next to currently enabled features in the Debug
menu. This routine is also used to place a check mark next to the Show Breaks
item in the Print menu when appropriate. You usually call this routine in your
overrides of DoSetupMenus to enable and place a check mark by menu items that
can be executed.
æKY EntDebugger
æD PROCEDURE EntDebugger(entering: BOOLEAN)
æFi UMacApp
æT PROCEDURE
æC EntDebugger is used internally by the MacApp debugger when entering or exiting
a routine.
The entering parameter has a value of TRUE when the debugger is entering a routine;
it is FALSE when the debugger is exiting a routine.
EntDebugger is called from the global routine DoInitUMacApp as part of the
initialization of the UDebug unit. You usually do not need to call this routine
yourself.
æKY EnterMacAppDebugger
æD PROCEDURE EnterMacAppDebugger;
æFi UDebug
æT PROCEDURE
æC EnterMacAppDebugger halts execution of the application and passes control to
the MacApp debugger.
EnterMacAppDebugger is called by several MacApp methods that work with the debugger,
such as the global routine ProgramBreak and Assertion. You can use this routine
in a similar fashion, but it is generally better to use ProgramBreak instead.
æKY EqualBlocks
æD FUNCTION EqualBlocks(first, second: UNIV Ptr; theSize: INTEGER): Boolean;
æFi UMacAppUtilities
æT PROCEDURE
æC EqualBlocks returns TRUE if the two blocks specified are equal over the specified
byte range.
The parameters first and second are pointers to the first and second blocks to
be compared, respectively. The parameter theSize specifies a byte range over
which the two blocks are to be compared.
MacApp calls EqualBlocks to compare a text style to that already present in a
text style record. You can call this routine to compare two blocks over a specified
range.
æKY EqualVPt
æD FUNCTION EqualVPt(pt1, pt2: VPoint): BOOLEAN;
æFi UViewCoords
æT PROCEDURE
æC EqualVPt returns TRUE if the two specified view points are the same point.
The pt1 and pt2 parameters specify the view points to be compared.
MacApp calls EqualVPoint for mouse-tracking and printing purposes. You can call
it whenever you want to compare two points specified in view coordinates.
æKY EqualVRect
æD FUNCTION EqualVRect(rectA, rectB: VRect): BOOLEAN;
æFi UViewCoords
æT PROCEDURE
æC EqualVRect performs a function similar to the Toolbox call EqualRect, except
it operates on rectangles specified in view coordinates: It returns TRUE if the
two specified view rectangles have identical boundary coordinates.
The parameters rectA and rectB specify the rectangles to be compared.
You can call this routine to compare two view rectangles.
æKY ErrorAlert
æD PROCEDURE ErrorAlert(err: OSErr; message: LongInt);
æFi UMacApp
æT PROCEDURE
æC ErrorAlert displays a standard alert box with your parameterized text; it
displays a generic alert box with a numeric error code if there is no parameter
text available. The message displayed in the alert box is based upon the err and
message parameters, as described in the section on Error and failure handling in
the MacApp 2.0 Cookbook.
The err parameter is the operating-system error code that caused the alert box
to be displayed. The message parameter specifies one of several MacApp constants
that are returned in several common error situations.
ErrorAlert is called by several MacApp error-handling methods. You can call it
when you wish to display an alert box with an error message.
æKY ExchangeHandles
æD PROCEDURE ExchangeHandles(VAR handle1, handle2: UNIV Handle);
æFi UDebug
æT PROCEDURE
æC ExchangeHandles exchanges the values of two handles; that is, when this routine
returns, handle1 is equal to the value of handle2 and handle2 is equal to the
original value of handle1.
The handle1 parameter is the first handle to be exchanged. The handle2 parameter is
the second handle to be exchanged.
ExchangeHandles is called by the global routine WithHideFromMacAppDo to exchange
data in saved globals with data in gTempRgn. This routine is for internal use by
MacApp; do not call it.
æKY ExitMacApp
æD PROCEDURE ExitMacApp;
æFi UMacApp
æT PROCEDURE
æC ExitMacApp terminates the application, removes MacApp trap patches, and then
calls the Toolbox routine ExitToShell.
MacApp does not call this routine. You usually do not need to call it yourself,
because MacApp terminates the application when the user selects the Quit command.
However, if for some reason you immediately want to dismiss the application, you
can call this routine.
æKY ExpandPtr
æD FUNCTION ExpandPtr(viewRsrc: UNIV Handle; VAR p: UNIV LONGINT;
offset: LONGINT): Ptr;
æFi UMacApp
æT PROCEDURE
æC ExpandPtr increases the size of the specified 'view' resource if an increase
is necessary for adding a new template. The view resource is increased by at
least the value of kViewRsrcExpandAmt.
The viewRsrc parameter specifies the resource whose size is to be increased. The
p parameter is offset to point to the next available position for a new template;
however, when the routine returns, p contains the value it had before it was
updated. The offset parameter is the amount by which p is offset to arrive at
its new value.
ExpandPtr is called by several WRes methods as well as the global routine ExpandPtrWStr.
You usually do not need to call this routine yourself.
æKY ExpandPtrWStr
æD FUNCTION ExpandPtrWStr(viewRsrc: UNIV Handle; VAR p: UNIV LONGINT;
offset, len: LONGINT): Ptr;
æFi UMacApp
æT PROCEDURE
æC ExpandPtrWStr increases the size of the specified 'view' resource if if an
increase is necessary for adding a new template that ends with a variable-length
string.
The view resource is increased by at least the value of kViewRsrcExpandAmt.The
viewRsrc parameter specifies the resource whose size is to be increased. The p
parameter is offset to point to the next available position for a new template;
however, when the routine returns, p contains the value it had before it was
updated. The offset parameter is the amount by which p is offset to arrive at
its new value. The len parameter indicates the length of the variable-length
string.
ExpandPtr is called by several WRes methods. You usually do not need to call
this routine yourself unless you are creating custom view templates.
æKY FailMemError
æD PROCEDURE FailMemError;
æFi UFailure
æT PROCEDURE
æC FailMemErr calls the global routine Failure if the Toolbox routine MemError
returns an error code other than noErr.
FailMemErr is called by a variety of methods that directly affect memory. You
can call this routine from your code to invoke the failure mechanism should your
request for memory fail.
æKY FailNewMessage
æD PROCEDURE FailNewMessage(error: INTEGER; oldMessage, newMessage: LONGINT);
æFi UFailure
æT PROCEDURE
æC FailNewMessage calls the global routine Failure with a new message instead of
the previous message (or default message if there was no previous message.)
The error parameter is the error code that corresponds to the failure conditions.
The high word of the oldMessage parameter is a value that maps to a failure
message in the standard list of operation strings (msgStrList) used by MacApp;
if the value of oldMessage is 0, then the new message is used instead. Similarly,
the high word of the newMessage parameter a value that maps to a failure message
in msgStrList that is to be used as the new failure message.
FailNewMessage is called from a variety of MacApp methods. You can call this
routine to propagate the failure call in your failure handler with a new message.
æKY FailNIL
æD PROCEDURE FailNIL(p: UNIV Ptr);
æFi UFailure
æT PROCEDURE
æC FailNIL calls the global routine Failure if the pointer passed to it has the
value NIL.
The p parameter is the pointer to be tested.
MacApp calls FailNIL in a variety of memory-management situations, normally
after allocating memory to ensure that the memory allocation was successful. You
can call FailNIL from your code to test the validity of newly created pointers.
æKY FailNILResource
æD PROCEDURE FailNILResource(r: UNIV Handle);
æFi UFailure
æT PROCEDURE
æC FailNILResource calls the global routine Failure if the specified resource
handle has the value NIL. This routine calls Failure with either the error code
returned by the Toolbox function ResError or the error code resNotFound if ResError
is noErr.
The r parameter is the resource handle to be tested.
MacApp calls FailNILResource from methods that create views, obtain windows that
are resources, initialize pop-up menus, and display print dialog boxes. You can
call FailNILResource from your code to test the validity of newly created resource
pointers.
æKY FailNonObject
æD PROCEDURE FailNonObject(obj: UNIV TObject);
æFi UObject
æT PROCEDURE
æC FailNonObject calls the global routine Failure when the specified object is
not a valid object.
The obj parameter specifies the object to be tested.
MacApp calls this routine from the object discipline dispatch mechanism, as well
as from methods that manipulate objects directly and therefore require that
those objects be valid. You can call this routine from your code when you need
to test an object's validity.
æKY FailNoReserve
æD PROCEDURE FailNoReserve;
æFi UMemory
æT PROCEDURE
æC FailNoReserve calls the global routine Failure when MacApp is unable to reserve
memory for its low-memory and code-segment reserves.
MacApp calls FailNoReserve from TTEView.MakeTERecord to ensure the availability
of reserve space when MakeTERecord is creating a new text record. You can call
this routine just after making significant memory allocations to ensure that
there is sufficient memory to continue.
æKY FailOSErr
æD PROCEDURE FailOSErr(error: INTEGER);
æFi UFailure
æT PROCEDURE
æC FailOSErr calls the global routine Failure if the specified error condition
does not have the value noErr.
MacApp calls FailOSError from numerous methods that make system calls that return
an OSErr requiring failure handling. You can call this routine from your code
when you wish to ensure graceful recovery from an operating-system error, while
disregarding the noErr error code.
æKY FailResError
æD PROCEDURE FailResError;
æFi UFailure
æT PROCEDURE
æC FailResError calls the global routine Failure if the ResError function does
not return the value noErr.
MacApp calls FailResError mostly from methods that access resources. You can
call this routine from your code when you wish to ensure graceful recovery from
a resource error, while disregarding the noErr error code.
æKY FailSpaceIsLow
æD PROCEDURE FailSpaceIsLow;
æFi UMemory
æT PROCEDURE
æC FailSpaceIsLow calls the global routine Failure when MacApp is close to running
out of memory as indicated by the global routine MemSpaceIsLow.
MacApp calls FailSpaceIsLow in a variety of situations that change the application's
memory requirements, such as when documents or desk accessories are being opened
and when data is being cut or pasted. You can call this routine as a safeguard
against operations whose memory requirements may exceed the amount of RAM available.
æKY Failure
æD PROCEDURE Failure(error: INTEGER; message: LONGINT);
æFi UFailure
æT PROCEDURE
æC The Failure routine calls the topmost failure handler.
The error parameter indicates the error condition that caused Failure to be
called. The message parameter indicates the message that is to be displayed.
MacApp calls Failure from numerous methods as a means of gracefully recovering
from error conditions. You can use this routine in a similar fashion.
æKY FieldToString
æD PROCEDURE FieldToString(theData: Ptr; fieldType: INTEGER;
VAR theString: Str255); EXTERNAL;
æFi UMacAppUtilities
æT PROCEDURE
æC FieldToString converts the specified data into a string representation.
The parameter theData is a pointer to the data to be represented as a string.
The fieldType parameter indicates the data's type. The parameter theString contains
the string representation of the data when the routine returns.
FieldToString is called by Inspector methods that represent objects as text
strings in an Inspector window. You usually do not need to call this routine
yourself.
æKY FileModDate
æD FUNCTION FileModDate(name: Str255; volRefnum: INTEGER): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC FileModDate returns the date the specified file was last modified; if an I/O
error occurs, the routine returns 0.
The name parameter is the pathname of the file whose modification date is to be
returned. The volRefnum parameter is the reference number of the volume that
contains the file.
FileModDate is called by TDocument methods that set a document’s fModDate field.
You can call this routine to obtain the date a file was last modified.
æKY FillInDirID
æD FUNCTION FillInDirID(pb: HParmBlkPtr): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC FillInDirID stores the directory ID of the working directory into the ioDirID
field of the specified HFS parameter block. If HFS is not installed, FillInDirID
sets the ioDirID field to 0.
The pb parameter is a pointer to the parameter block whose ioDirID field is to
be modified.
FillInDirID is called by several methods that directly manipulate files. You can
use this routine in a similar fashion. After setting up your HParamBLockRec
record, call FillInDirID to fill in the directory ID and then make the “H” form
of the call (for example, PBHGetFInfo rather than PBGetFInfo).
æKY FinderSegProc
æD PROCEDURE FinderSegProc;
æFi UMacApp.Globals
æT PROCEDURE
æC FinderSegProc is a null routine used to make the Finder™ segment resident
when the user is printing or opening documents from the Finder.
MacApp calls this routine from TApplication.Run when the user prints from the
Finder. You usually do not need to call this routine yourself.
æKY FindWindowBefore
æD FUNCTION FindWindowBefore(theWindow: WindowPtr): WindowPtr;
æFi UMacAppUtilities
æT PROCEDURE
æC FindWindowBefore returns the window that precedes the specified window in the
window list. This routine returns NIL if the specified window is frontmost or
not found.
The parameter theWindow is a pointer to the window that follows the window you
want to find.
FindWindowBefore is used by the MacApp debugger to find the application's frontmost
window when the Debug Transcript window is frontmost on the screen. You can use
this routine in a similar fashion.
æKY ForceBusy
æD PROCEDURE ForceBusy;
æFi UBusyCursor
æT PROCEDURE
æC ForceBusy calls the global routine BusyReset with a value of 1 to display the
watch cursor immediately and reset the value of the busy-cursor delay.
MacApp uses ForceBusy when it initializes globals as an application is opened.
You can call this routine whenever you need to display the watch cursor immediately.
æKY FreeIfObject
æD PROCEDURE FreeIfObject(obj: TObject);
æFi UObject
æT PROCEDURE
æC FreeIfObject determines whether the specified value is a non-NIL object and,
if so, calls the object’s Free method.
The obj parameter is the object to be freed.
MacApp calls this routine from a variety of methods that free active objects.
You can use this routine in a similar fashion.
æKY FreeIfWMgrWindow
æD FUNCTION FreeIfWMgrWindow(w: WindowPtr; dispose: BOOLEAN): WindowPtr;
æFi UMacApp
æT PROCEDURE
æC FreeIfWMgrWindow can dispose of the specified window pointer or simply close
the specified Window Manager window. As a convenience to the caller, this routine
always returns a NIL window pointer.
The w parameter is the pointer to the Window Manager window that is to be disposed
of. Set the value of the dispose parameter to TRUE to free the specified Window
Manager window; if you set the value of the dispose parameter to FALSE, this
routine simply closes the Window Manager window.
MacApp uses this routine to dispose of Window Manager windows for which no TWindow
object has been created. You can use this routine in a similar fashion.
æKY FreeListIfObject
æD FUNCTION FreeListIfObject(list: TList): TList;
æFi UList
æT PROCEDURE
æC FreeListIfObject frees the specified TList object if it is not NIL; if the
object is NIL, this routine does nothing. As a convenience to the caller, this
routine always returns NIL.The list parameter specifies the TList object that is
to be freed.
MacApp calls this routine from the Free methods of classes TAssociation,
TDocument, and TInspector. You can use this routine to free TList objects.
æKY FreeObject
æD PROCEDURE FreeObject(obj: TObject);
æFi UObject
æT PROCEDURE
æC FreeObject determines whether the specified value is a non-NIL object and, if
so, calls its Free method. This routine accomplishes exactly the same task as
FreeIfObject; it has been included to allow backward compatibility with previous
versions of MacApp.
The obj parameter is the object to be freed.
MacApp calls this routine from a variety of methods that free active objects.
You can use this routine in a similar fashion.
æKY FreeWMgrWindow
æD PROCEDURE FreeWMgrWindow(w: WindowPtr; dispose: BOOLEAN);
æFi UMacApp
æT PROCEDURE
æC FreeWMgrWindow closes a Window Manager window. This routine also frees memory
used by the window if instructed to do so.
The w parameter is a pointer to the Window Manager window to be closed. If you
set the value of the dispose parameter to TRUE, this routine frees the memory
used by the window.
FreeWMgrWindow is called by several methods that manipulate window objects. You
can call this routine to dispose of a Window Manager window.
æKY GetA5
æD FUNCTION GetA5: LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC Formerly named %_GetA5, the GetA5 routine returns the value of register A5.
The address stored in register A5 is generally a pointer to the program's global
area.
MacApp calls GetA5 to obtain the immediate value of register A5, which is
not always the same value as that returned by the GetCurrentA5 routine.
æKY GetActualJustification
æD FUNCTION GetActualJustification(justification: INTEGER): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC GetActualJustification interprets the teJustSystem constant and returns a
value of teJustLeft or teJustRight.
The justification parameter has no meaning to this routine unless its value is
teJustSystem; other values of justification are simply passed through this routine
unaltered.
MacApp calls this routine from methods that draw text, select text, or set text
justification. You can use this routine to convert a teJustSystem constant to a
value of teJustLeft or teJustRight.
æKY GetAndLoadWDefProc
æD FUNCTION GetAndLoadWDefProc(windowDefProc: Handle): Handle;
æFi UMacApp.TWindow
æT PROCEDURE
æC GetAndLoadWDefProc returns the actual address of the specified window definition
procedure and loads the resource containing the procedure if it has been purged.
The windowDefProc parameter is the handle to the specified window definition procedure.
MacApp uses this routine to obtain the window definition procedure for the Window
Manager window associated with a TWindow object. You can use this routine in a
similar fashion.
æKY GetCallersMethodName
æD PROCEDURE GetCallersMethodName(VAR s: MAName);
æFi UDebug
æT PROCEDURE
æC GetCallersMethodName retrieves the name of the last method called and stores
it in the s parameter.
The s parameter contains the retrieved method name when the routine returns.
MacApp uses this routine when it needs to refer to the calling method—for instance,
when indicating the last method called before the failure mechanism was invoked.
You can use this routine in a similar fashion.
æKY GetClassID
æD FUNCTION GetClassID(obj: TObject): ObjClassId;
æFi UObject
æT PROCEDURE
æC GetClassID returns the identifier that corresponds to the specified object’s
class.
The obj parameter is the object whose class identifier is to be determined.
MacApp calls GetClassID from a variety of methods that need to refer to objects
by class identifier. You can use this routine in a similar fashion.
æKY GetClassIDFromName
æD FUNCTION GetClassIDFromName(clName: MAName): ObjClassId;
æFi UObject
æT PROCEDURE
æC GetClassIDFromName returns the identifier that corresponds to the specified
class name.
The clName parameter is the name of the class whose identifier is to be determined.
MacApp uses GetClassIDFromName in several methods that create and manipulate
objects by name, such as TEvtHandler.CreateAView and the global routines
NewObjectByClassName and RegisterStdType. You can call GetClassIDFromName when you
need the class identifier of an object for which you have a class name.
æKY GetClassNameFromID
æD PROCEDURE GetClassNameFromID(classID: ObjClassId; VAR clName: MAName);
æFi UObject
æT PROCEDURE
æC GetClassNameFromID returns the class name that corresponds to the specified
class identifier.
The classID parameter is the identifier of the class whose name is to be found.
When the routine returns, the clName parameter contains the class name corresponding
to the specified class identifier.
MacApp uses GetClassNameFromID in several methods that create and manipulate
objects directly, such as the global routines NewObjectByClassId and OrderClassIdsByName.
You can call GetClassNameFromID when you need the corresponding class name for a
specified class identifier.
æKY GetClassSizeFromId
æD FUNCTION GetClassSizeFromId(classID: ObjClassId): INTEGER;
æFi UObject
æT PROCEDURE
æC GetClassSizeFromId returns the size, in bytes, of an instance of the specified
class.
The classID parameter is the class identifier of the class whose instance size is
to be determined.
MacApp uses GetClassSizeFromId in several methods that return information about
an object, such as TObject.GetClassSize and the global debugging routine
VerboseIsObject. You can use this routine in a similar fashion.
æKY GetCrsrBusy
æD FUNCTION GetCrsrBusy: SignedByte;
æFi ULoMem
æT PROCEDURE
æC GetCrsrBusy returns the state of the low memory CrsrBusy flag, a signed byte
that indicates whether the cursor should be changed to a busy cursor.
GetCrsrBusy is used by methods in the UBusyCursor unit to determine if the cursor
is actively being moved by the user; if the cursor is moving, these methods do
not alter it. You can call this routine to determine an opportune time to display
the busy cursor.
æKY GetCurJTOffset
æD FUNCTION GetCurJTOffset: INTEGER;
æFi ULoMem
æT PROCEDURE
æC GetCurJTOffset returns the offset from the A5 register to the beginning of
the jump table.
MacApp calls this routine from the global routine UnloadAllSegments. You can
call this routine to get the size of the offset between A5 and the beginning of
the jump table.
æKY GetCurStackBase
æD FUNCTION GetCurStackBase: Ptr;
æFi ULoMem
æT PROCEDURE
æC GetCurStackBase returns a pointer to the current stack base.
GetCurStackBase is called by MacApp debugger methods that display stack information
and by the global routine SetStackSpace, which MacApp calls when opening an
application.
You can call this routine to obtain a pointer to the current stack base.
æKY GetCurStackFramePtr
æD FUNCTION GetCurStackFramePtr: Ptr;
æFi UMacAppUtilities
æT PROCEDURE
æC Formerly named %_GetA6, GetCurStackFramePtr returns the value of register A6,
which is usually a pointer to the local stack frame.
MacApp uses GetCurStackFramePtr to determine the caller's name when invoking a
debugging routine. You can use this routine in a similar fashion.
æKY GetCurStackTop
æD FUNCTION GetCurStackTop: Ptr;
æFi UMacAppUtilities
æT PROCEDURE
æC Formerly named %_GetA7, GetCurStackTop returns the value of register A7,
which is usually a pointer to the top of the stack.
The MacApp debugger uses GetCurStackTop when analyzing the stack. You can use
this routine in a similar fashion.
æKY GetDirID
æD FUNCTION GetDirID(VAR vRefnum: INTEGER; VAR dirID: LONGINT): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC GetDirID returns the directory ID of the working directory. If HFS is not
installed, GetDirID returns a value of 0.
When the routine returns, the vRefnum parameter is the volume reference number
of the volume that contains the working directory, and the dirID parameter is
the directory ID of the working directory.
GetDirID is called by TApplication.AlreadyOpen and the global routine FillInDirID.
TApplication.AlreadyOpen uses the information GetDirID returns to provide an
error code. FillInDirID uses the information GetDirID returns to fill in the
ioDirID field of a specified HFS parameter block. You can call GetDirID to obtain
the directory ID of the working directory.
æKY GetErrTxt
æD FUNCTION GetErrTxt(errorCode: INTEGER): Str255;
æFi UDebug
æT PROCEDURE
æC GetErrTxt returns a string associated with the specified error code.
The errorCode parameter specifies the error code for which this routine returns a
string.
GetErrTxt is called by the global routine DebugException. You usually do not
need to call this routine yourself.
æKY GetFileInfo
æD FUNCTION GetFileInfo(name: Str255; volRefnum: INTEGER;
VAR info: HParamBlockRec): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC GetFileInfo returns the specified file's HFS parameter block record. This
method also returns one of the following error codes:
bdNamErr Bad file name
dirNFErr Directory not found or incomplete pathname
extFSErr External file system
fnfErr File not found
ioErr I/O error
nsvErr No such volume
paramErr No default volume
The name parameter is a string specifying the file's name. The
volRefnum parameter is the reference number of the volume that contains the
file.
GetFileInfo is called by several methods that manipulate documents, such
as TDocument.Save, TDocument.DiskFileChanged, and the global routine FileModDate.
æKY GetFocus
æD PROCEDURE GetFocus(VAR theFocusRec: FocusRec);
æFi UMacApp
æT PROCEDURE
æC GetFocus stores the current focus in a focus record. The focus record's clip
region must be a valid region.
The parameter theFocusRec contains the saved focus record when the routine returns.
GetFocus is called by a variety of methods that save the current focus, perform
an operation with a different focus, and then restore the saved focus. You can
use it in a similar fashion.
æKY GetFontNum
æD FUNCTION GetFontNum(fontName: Str255): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC GetFontNum returns the font number corresponding to the specified font name.
The fontName parameter is a string specifying the name of the font whose font
number is to be returned. If fontName has the value kSysFontName, this routine
returns a result of 0. If fontName has the value kApplFontName, this routine
returns a result of 1.
MacApp calls GetFontNum when setting the font for certain views and controls.
You can use this routine to obtain the font number of a font that has been specified
by name.
æKY GetFrameInfo
æD PROCEDURE GetFrameInfo(calleeFrame: Longint; ppc: Longint;
VAR callerFrame: Longint; VAR itsFrame: Longint; VAR itsReceiver: TObject;
VAR className: MAName; VAR procName: MAName; VAR rcvrHandle: HexAddress;
VAR rcvrClass: MAName; VAR theSegNum: INTEGER);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY GetFreeMastersCount
æD FUNCTION GetFreeMastersCount: Longint;
æFi UDebug
æT PROCEDURE
æC GetFreeMastersCount returns the number of free master pointers in the application
heap zone.
GetFreeMastersCount is called by methods of the MacApp debugger when you request
a report of the master pointer usage. You can use this routine in a similar
fashion.
æKY GetFSFCBLen
æD FUNCTION GetFSFCBLen: INTEGER ;
æFi ULoMem
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY GetGZMoveHnd
æD FUNCTION GetGZMoveHnd: Handle;
æFi ULoMem
æT PROCEDURE
æC GetGZMoveHnd returns a handle that may be moved by the global routine GrowZoneProc.
GetGZMoveHnd is called by the global routine HandleIsEligible when HandleIsEligible
is testing a handle’s eligibility for purging. You usually don’t call this routine,
although you can call it to obtain a handle that can be moved by the GrowZoneProc
routine.
æKY GetGZRootHnd
æD FUNCTION GetGZRootHnd: Handle;
æFi ULoMem
æT PROCEDURE
æC GetGZRootHnd returns a handle to the block that must not be moved by the
global routine GrowZoneProc. GetGZRootHnd is called by the global routine HandleIsEligible
when HandleIsEligible is testing a handle’s eligibility for purging. You usually
don’t call this routine, although you can call it to obtain a handle that must
not be moved by the GrowZoneProc routine.
æKY GetHandleBits
æD FUNCTION GetHandleBits(h: Handle): SignedByte;
æFi UMacAppUtilities
æT PROCEDURE
æC GetHandleBits returns the flags of the master pointer for the specified handle;
it is used in conjunction with the global routine SetHandleBits to save and
restore the state of the flags.
The h parameter is the handle whose master pointer information is returned by this
routine.
MacApp calls this routine to get the flag information for a specified handle's
master pointer. You can save the flags, change the state of any of the flags,
and then restore the flags by passing them back to the global routine SetHandleBits.
æKY GetHwCfgFlags
æD FUNCTION GetHwCfgFlags: INTEGER;
æFi ULoMem
æT PROCEDURE
æC GetHwCfgFlags returns information about the hardware configuration on which
the application is to run.
This routine is called by the global routine DefineConfiguration when an application
is opened. You usually don’t need to call this routine yourself.
æKY GetIfBkColor
æD PROCEDURE GetIfBkColor(VAR aColor: RGBColor);
æFi UMacAppUtilities
æT PROCEDURE
æC GetIfBkColor returns the current background color. This routine works with
both QuickDraw and Color QuickDraw.
The aColor parameter contains the value of the current background color when this
routine returns.
GetIfBkColor is called by methods of the class TPopup to redraw the background
correctly after displaying a pop-up menu. You can use this routine in a similar
fashion.
æKY GetIfColor
æD PROCEDURE GetIfColor(VAR aColor: RGBColor);
æFi UMacAppUtilities
æT PROCEDURE
æC GetIfColor returns the current foreground color. This routine works with both
QuickDraw and Color QuickDraw.
The aColor parameter contains the value of the current foreground color when this
routine returns.
GetIfColor is called by methods of the classes TPopup, TCluster, and TStaticText
to get the color used for drawing on the screen. You can use this routine in a
similar fashion.
æKY GetLevel
æD PROCEDURE GetLevel(level: INTEGER; topFrame: Longint; VAR calleeFrame,
itsFrame: Longint);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY GetLMMBarHeight
æD FUNCTION GetLMMBarHeight: INTEGER;
æFi ULoMem
æT PROCEDURE
æC GetLMMBarHeight returns the menu bar height on hardware configurations that
have 128 KB ROMs or better and are running system 4.1 or better.
MacApp calls this routine from the global routine DoRealInitToolBox. You can
call this routine to get the proper height of the menu bars, expressed in pixels.
If the system has the Script Manager, call the Script Manager routine GetMBarHeight
instead of using this routine.
æKY GetMenuColors
æD PROCEDURE GetMenuColors(popupRect: Rect; menuID, itemNum: INTEGER;
VAR fColor, bColor: RGBColor);
æFi UDialog
æT PROCEDURE
æC GetMenuColors gets the colors in which to draw a specified pop-up menu.
The popupRect parameter is the rectangle that defines the dimensions of the menu
to be drawn. The menuID parameter identifies the menu to be drawn. The itemNum
parameter identifies the item selected, if there is one. When the routine returns,
the fColor parameter identifies the foreground color and the bColor identifies
the background color.
GetMenuColors is called by methods of the TPopup class when they are drawing a
pop-up menu. You can use this routine in a similar fashion.
æKY GetMenuList
æD FUNCTION GetMenuList: Handle;
æFi ULoMem
æT PROCEDURE
æC GetMenuList returns a handle to the current menu handle list.
GetMenuList is called by the global routine EachMenuDo when it is iterating over
all the menus. You can use this routine to obtain a handle to the current menu
list data structure.
æKY GetMethodName
æD PROCEDURE GetMethodName(ppc: Longint; VAR s: MAName);
æFi UDebug
æT PROCEDURE
æC GetMethodName returns the name of the method that contains the code at the
specified address. If the code in question does not belong to a method, this
routine returns the null string.
The ppc parameter is the address of the code to be named. The s parameter contains
the method name when this routine returns.
MacApp calls GetMethodName when the method name of a particular piece of code is
required—for example, when cloning objects, when invoking failure handlers, and
when reporting information to the MacApp debugger. You can use this routine to
get a method name for a particular piece of code.
æKY GetNewCenteredDialog
æD FUNCTION GetNewCenteredDialog(dialogID: INTEGER; dStorage: Ptr;
behind: WindowPtr): DialogPtr;
æFi UMacApp
æT PROCEDURE
æC GetNewCenteredDialog sets the cursor to an arrow and creates a dialog box
that is centered on the screen.
The dialogID parameter is the resource ID of a dialog template that supplies
parameters used to create the new dialog box. The dStorage parameter is a pointer
to the storage to use for the dialog record. If you set dStorage to NIL, the
dialog record will be allocated on the heap, which may cause the heap to become
fragmented when you are using this routine to create modeless dialogs. The behind
parameter specifies the window behind which the dialog box is to be placed. To
display the dialog box in front of all other windows, set the value of the behind
parameter to POINTER(-1).
MacApp does not call this routine, although the samples do. It is provided for
your convenience. You can use it to create dialog boxes that are centered on the
screen.
æKY GetParmBlockPtr
æD FUNCTION GetParmBlockPtr: LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC Formerly named %_GetA0, GetParmBlockPtr returns the value of register A0.
MacApp uses GetParmBlockPtr to obtain the pointer to the parameter block from a
VBL task or a completion routine. You can use this routine in a similar fashion.
æKY GetPortFontInfo
æD PROCEDURE GetPortFontInfo(fontNum: INTEGER; VAR fontName: Str255;
VAR fontSize: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC GetPortFontInfo returns the font name and size corresponding to a given font
number, in portable format.
The fontNum parameter is the number of the font whose name and size is to be
returned. If the value of fontNum corresponds to the system font, then this
routine returns the value of the constant kSysFontName in the fontName parameter;
similarly, if the value of fontNum corresponds to the application font, then
this routine returns the value of the constant kApplFontName. Otherwise, this
routine returns the font name provided the Toolbox routine GetFontName. The
fontSize parameter is the size of the font, in points. If the value of fontNum
corresponds to the system or application font, this routine returns 0 if the
font is the default size.
MacApp calls this routine from the WRes methods of classes TControl and TTextGridView.
You can use this routine when you need information about a font for which you
have a font number.
æKY GetPortTextStyle
æD PROCEDURE GetPortTextStyle(theTextStyle: TextStyle);
æFi UMacAppUtilities
æT PROCEDURE
æC GetPortTextStyle gets the current port's text style and stores it in the
TextStyle record.
The parameter theTextStyle is the text style record that is set up when you call
this routine.
WARNING: This parameter should be a VAR parameter so that the text
styles can be returned. In MacApp 2.0, this routine does not work.
You can use this routine to get the values of the tsFont, tsFace, tsSize,
and tsColor fields from the current port. For information about TextStyle records,
see the TextEdit chapter of Inside Macintosh, Volume V.
æKY GetProcName
æD PROCEDURE GetProcName(ppc: LONGINT; VAR className, procName: MAName);
æFi UDebug
æT PROCEDURE
æC GetProcName returns the name of the routine or method that contains the code
at the specified address.
The ppc parameter is the address of the code to be identified. The className and
procName parameters contain the method's class name and method name, respectively,
when GetProcName returns.
GetProcName is called by the MacApp debugger when it needs to display a routine
or method name associated with a particular piece of code. You can use this
routine in a similar fashion.
æKY GetPromptedChar
æD FUNCTION GetPromptedChar(prompt: StringPtr; validChars: StringPtr;
PROCEDURE helpProc): CHAR;
æFi UDebug
æT PROCEDURE
æC GetPromptedChar displays a prompt in the Debug Transcript asking the user for
a single-character response, reads the user response from the command line,
writes it to the screen, and, if appropriate, calls a help procedure.
The prompt parameter is a pointer to the string that is displayed to prompt the
user. The validChars parameter is a pointer to the string of characters considered
to be valid responses. The helpProc parameter is a procedure you define; this
routine calls the helpProc procedure in response to a help request from the
user.
GetPromptedChar is used internally by the MacApp debugger. You never need to
call it yourself.
æKY GetPromptedNames
æD FUNCTION GetPromptedNames(prompt: StringPtr;
VAR className, procName: MAName): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC GetPromptedNames displays a prompt in the Debug Transcript asking the user
for the name of a method or routine, reads the user response from the command
line, writes it to the screen, and calls the appropriate help procedure. This
routine returns TRUE when it receives a user response consisting of characters
in the accepted character set. It does not check the validity of the method or
routine name that the user enters.
The prompt parameter is a pointer to the string that is displayed as a prompt.
The className parameter is the class name of the method that the user enters in
response to the prompt. The procName parameter is the method name—without a
class name—that the user enters in response to the prompt.
GetPromptedNames is used internally by the MacApp debugger. You never need to
call it yourself.
æKY GetPromptedNumber
æD FUNCTION GetPromptedNumber(prompt: StringPtr;
VAR asDecimal, asHex: Longint): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC GetPromptedNumber returns TRUE when the user enters a valid number. If it
returns FALSE, but the values of the asDecimal and asHex parameters are 0, then
the user pressed only the Return key.
The prompt parameter is a pointer to the string that is displayed to prompt the
user. If the value of the asDecimal parameter is -1, then this routine accepts
decimal input and uses the local symbol table. If the value of asHex is -1, then
this routine accepts hexadecimal input.
GetPromptedNumber is used internally by the MacApp debugger. You never need to
call it yourself.
æKY GetPromptedNumberWithDefault
æD FUNCTION GetPromptedNumberWithDefault(prompt: StringPtr;
default: integer): integer;
æFi UDebug
æT PROCEDURE
æC GetPromptedNumberWithDefault returns the number that the user typed in response
to the specified prompt. If the user presses the Return key in response to the
prompt, this routine returns a specified default value.
The prompt parameter is a pointer to the string that is displayed as a prompt.
The default parameter is the value this routine returns if the user presses the
Return key in response to the prompt.
GetPromptedNumberWithDefault is used internally by the MacApp debugger. You
never need to call it yourself.
æKY GetPromptedString
æD FUNCTION GetPromptedString(prompt: StringPtr; PROCEDURE helpProc): Str255;
æFi UDebug
æT PROCEDURE
æC GetPromptedString returns the string that the user types in response to the
specified prompt.
The prompt parameter is a pointer to the string that is displayed as a prompt.
The helpProc parameter is a procedure you define: it is called by this routine
in response to a help request from the user.
GetPromptedString is used internally by the MacApp debugger. You never need to
call it yourself.
æKY GetPromptedStringWithDefault
æD FUNCTION GetPromptedStringWithDefault(prompt: StringPtr; default: StringPtr;
PROCEDURE helpProc): Str255;
æFi UDebug
æT PROCEDURE
æC GetPromptedStringWithDefault returns the string that the user typed in response
to the specified prompt. If the user presses the Return key in response to the
prompt, this routine returns a specified default value.
The prompt parameter is a pointer to the string that is displayed as a prompt.
The default parameter is a pointer to the string that this routine returns if
the user presses the Return key in response to the prompt.
GetPromptedStringWithDefault is used internally by the MacApp debugger. You
never need to call it yourself.
æKY GetPromptedValue
æD FUNCTION GetPromptedValue(prompt: StringPtr; VAR asDecimal, asHex: Longint;
symbolOK: BOOLEAN; VAR gotSymbol: BOOLEAN): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC GetPromptedValue returns TRUE when the user enters a valid number. If it
returns FALSE, but the values of all its parameters are 0, then the user pressed
the Return key.
The prompt parameter is a pointer to the string that is displayed as a prompt.
If the value of the asDecimal parameter is -1, then this routine accepts decimal
input and uses the local symbol table. If the value of asHex is -1, then this
routine accepts hexadecimal input. If the value of the symbolOK parameter is
TRUE, then this routine accepts non-alphanumeric characters as input. The value
of the gotSymbol parameter is TRUE when the user enters a valid symbol in response
to the prompt.
GetPromptedValue is used internally by the MacApp debugger. You never need to
call it yourself.
æKY GetRcvrAtLevel
æD FUNCTION GetRcvrAtLevel(level: INTEGER; topFrame: Longint): TObject;
æFi UDebug
æT PROCEDURE
æC GetRcvrAtLevel retrieves the value of SELF at a specified level of the internal
stack in MacApp. This routine is used internally by MacApp; you never need to
call it yourself.
æKY GetReserveSize
æD PROCEDURE GetReserveSize(VAR szCodeReserve, szMemReserve: Size);
æFi UMemory
æT PROCEDURE
æC GetReserveSize retrieves the sizes of the MacApp low-memory and code-segment
reserves and stores them in the specified variables.
The szCodeReserve parameter is the variable in which the size of the code reserve
is to be stored. The szMemReserve parameter is the variable in which the size of
the low-memory reserve is to be stored.
GetReserveSize is called by TApplication.OpenOld, which adjusts the size of the
low-memory reserve to ensure that the application is able to open existing documents.
You can call GetReserveSize to check the sizes of the code and low memory reserves.
Note: The result returned by this routine is not a true indication of whether
the specified amount of memory has in fact been reserved. You can call CheckReserve
to find out if the code reserve can be allocated; you can call MemSpaceIsLow to
find out if the low-memory reserve was allocated.
æKY GetResLoad
æD FUNCTION GetResLoad: BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC GetResLoad returns TRUE if resources are to be loaded when the Toolbox function
GetResource is called.
GetResLoad is called by several memory-management methods that need to control
whether or not a resource is read into memory when the Resource Manager gets a
resource. For example, the global routine GetSegSize determines the size of all
the resources in a segment without actually loading the segment. You can use
GetResLoad to read the state of the ResLoad flag.
æKY GetResMenu
æD FUNCTION GetResMenu(menuResID: INTEGER): MenuHandle;
æFi UMenuSetup
æT PROCEDURE
æC GetResMenu returns a menu handle for the menu that has the specified resource
ID, whether or not that menu is currently in the menu bar. This routine also
reads the resource data into memory if it is not already in memory; however it
does not do so if you call the Toolbox function SetResLoad with an argument of
FALSE.
The menuResID parameter is the ID of the 'MENU' resource whose handle is returned
by this routine.
MacApp calls GetResMenu from methods that set up menus and enable commands. You
can use this routine to obtain a handle to a specified menu regardless of whether
it is currently in memory.
æKY GetROMMapInsert
æD FUNCTION GetROMMapInsert: Ptr ;
æFi ULoMem
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY GetSaveVisRgnPtr
æD FUNCTION GetSaveVisRgnPtr: RgnHandlePtr;
æFi ULoMem
æT PROCEDURE
æC GetSaveVisRgnPtr returns a pointer to a visible region that was temporarily
saved during an update cycle. GetSaveVisRgnPtr is called by the MacApp debugger.
You usually do not need to call this routine yourself.
æKY GetSegFromPC
æD FUNCTION GetSegFromPC(ppc: Longint): INTEGER;
æFi UMemory
æT PROCEDURE
æC GetSegFromPC returns the code segment number for the program counter's current
location. This routine returns a value of 0 if the segment is not in memory or
cannot be found.
The ppc parameter is the program counter's current value.
GetSegFromPC is called by the MacApp debugger. You can use this routine to get
the segment number containing the program counter's current value.
æKY GetSegNumber
æD FUNCTION GetSegNumber(aProc: ProcPtr): INTEGER;
æFi UMemory
æT PROCEDURE
æC GetSegNumber returns the number of the segment that contains the specified
procedure. If the routine that computed the address of the procedure was in the
same segment as the procedure, this routine returns a value of 0.
The aProc parameter is a pointer to the procedure whose segment number is to be
returned by this routine.
GetSegNumber is called by MacApp initialization routines and by TApplication.Run.
You can use this routine to find the number of the segment that contains a specified
procedure.
æKY GetSegResource
æD FUNCTION GetSegResource(segNum: INTEGER): Handle;
æFi UMemory
æT PROCEDURE
æC GetSegResource returns a handle to the specified application's 'CODE' resource;
it returns NIL if the resource cannot be found.
The segNum parameter specifies which 'CODE' resource to retrieve.
GetSegResource is called from the global routine DoInitUMemory to load the application's
main code segments at startup. You never need to call it yourself.
æKY GetSegSize
æD FUNCTION GetSegSize(segNum: INTEGER): Size;
æFi UMemory
æT PROCEDURE
æC GetSegSize returns the size, in bytes, of the specified code segment.
The segnum parameter is the segment number of the segment whose size is to be
determined.
You can call this routine to determine the size of a specified segment.
æKY GetSuperClassID
æD FUNCTION GetSuperClassID(objID: ObjClassId): ObjClassId;
æFi UObject
æT PROCEDURE
æC GetSuperClassID returns the class identifier of the superclass of the specified
class. This routine returns the value kNilClass for the superclass of the TObject
class.
The objID parameter is the class identifier of the class whose superclass is to be
identified.
MacApp calls GetSuperClassID when it needs a reference to the superclass of a
specified class. You can use this routine in a similar fashion.
æKY GetSuperClassTableHandle
æD FUNCTION GetSuperClassTableHandle: Handle;
æFi UObject.Globals
æT PROCEDURE
æC GetSuperClassTableHandle returns a handle to the superclass table.
MacApp calls this routine once when setting up the dispatcher. You can call this
routine when you want to obtain a handle to the superclass table.
æKY GetTextStyleFontInfo
æD PROCEDURE GetTextStyleFontInfo(theTextStyle: TextStyle; VAR theFontInfo: Fontinfo);
æFi UMacApp
æT PROCEDURE
æC GetTextStyleFontInfo returns the FontInfo record for the specified font,
face, and size.
The parameter theTextStyle is a record of type TextStyle that specifies the font
number (or font family number, if appropriate), the character style (the face—
bold, italic, and so forth), the text size in points, and the text’s RGB color.
The parameter theFontInfo stores the FontInfo record when this routine returns.
MacApp calls GetTextStyleFontInfo from methods that set text styles for pop-up
menus, dialog boxes and TTEView views. You can use this routine in a similar
fashion. For further discussion of TextStyle records, see the TextEdit chapter
of Inside Macintosh, Volume V. For information about the FontInfo data type, see
the QuickDraw chapter of Inside Macintosh, Volume I.
æKY GetTheCrsr
æD FUNCTION GetTheCrsr: CursPtr;
æFi ULoMem
æT PROCEDURE
æC GetTheCrsr returns a pointer to the current cursor record.
GetTheCrsr is used internally by the global routine CurrentCursor. You never need
to call it yourself.
æKY GetTrapType
æD FUNCTION GetTrapType(theTrap: INTEGER): TrapType;
æFi UMacAppUtilities
æT PROCEDURE
æC GetTrapType returns the trap's type—an operating-system trap (OSTrap) or a
Toolbox trap (ToolTrap).
The parameter theTrap is the trap whose type this routine returns. (The Integer
values are mapped to trap types through the system trap table.)
MacApp calls GetTrapType when patching and unpatching traps. You can call this
routine to determine whether a trap is an operating-system trap or a Toolbox
trap.
æKY GetUnitNtryCnt
æD FUNCTION GetUnitNtryCnt: INTEGER;
æFi ULoMem
æT PROCEDURE
æC GetUnitNtryCnt returns the number of entries in the unit table.
MacApp calls GetUnitNtryCnt from TApplication.OpenDeskAccessory to determine
whether a desk accessory is already open when the user attempts to open it. This
routine is intended for internal use by MacApp; you never need to call it yourself.
æKY GetUTableBase
æD FUNCTION GetUTableBase: UnitTablePtr;
æFi ULoMem
æT PROCEDURE
æC GetUTableBase returns a pointer to the beginning of the unit table.
MacApp calls GetUTableBase from TApplication.OpenDeskAccessory to determine
whether a desk accessory is already open when the user attempts to open it. This
routine is intended for internal use by MacApp; you never need to call it yourself.
æKY GetWindowList
æD FUNCTION GetWindowList: WindowPtr;
æFi ULoMem
æT PROCEDURE
æC GetWindowList returns a pointer to a Z-ordered linked list of Window Manager
windows.
GetWindowList is called by the global routine EachWMgrWindowDo. You can
call this routine to obtain a pointer to the list of Window Manager windows.
æKY GetWindowVariant
æD FUNCTION GetWindowVariant(theWindow: WindowPtr): INTEGER;
æFi UMacApp.TWindow
æT PROCEDURE
æC GetWindowVariant returns the specified window pointer’s variation code.
The parameter theWindow is the pointer to the specified Window Manager window.
MacApp uses this routine to obtain the variant code for the Window Manager window
associated with a TWindow object. For more information about variants, see the
Window Manager chapter in Inside Macintosh, Volume I.
æKY GrowZoneProc
æD FUNCTION GrowZoneProc(needed: Size): LONGINT;
æFi UMemory
æT PROCEDURE
æC GrowZoneProc attempts to increase the size of the application heap by a specified
amount, returning a value equal to the amount of space by which the heap size
actually was increased. If no space can be allocated, this routine returns a
value of zero.
The needed parameter specifies the amount of additional heap space this routine
should attempt to create.
GrowZoneProc is installed as the grow zone routine in the global routine InitUMemory.
You never need to call this routine yourself.
æKY HandleIsEligible
æD FUNCTION HandleIsEligible(h: Handle): BOOLEAN;
æFi UMemory
æT PROCEDURE
æC HandleIsEligible returns TRUE if the specified handle is in memory and is not
the same handle specified by the global routines GetGZMoveHnd or GetGZRootHnd.
The h parameter is the handle to be tested.
HandleIsEligible is called by several memory-management routines that allocate
heap space. You usually do not need to call this routine yourself.
æKY HandlerExists
æD FUNCTION HandlerExists(testFailInfoPtr: FailInfoPtr): Boolean;
æFi UFailure
æT PROCEDURE
æC HandlerExists returns TRUE if the specified failure handler exists in the
linked list of failure handlers from gTopHandler to the outermost handler.
The testFailInfoPtr parameter is the pointer to the FailInfo record whose failure
handler you are checking.
MacApp calls HandlerExists from the global routine Success when removing the top
failure handler from the global failure handler stack. You can use this routine
to test the linked list of failure handlers for the existence of a specified
failure handler.
æKY HdlInitFailed
æD PROCEDURE HdlInitFailed(error: OSErr; message: LongInt);
æFi UMacApp.Globals
æT PROCEDURE
æC HdlInitFailed is the outermost failure handler. In the event that this failure
handler gets executed, it displays an informative error message and then quits
the application.
The error parameter is the operating-system error code that corresponds to the
conditions that signalled failure. The message parameter corresponds to the
informative error message displayed to the user when the failure occurs. This
failure handler is installed in InitUMacApp and never removed.
You never call this routine.
æKY Head1Patch
æD FUNCTION Head1Patch (VAR thePatch: TrapPatch; theTrapNum: INTEGER;
theRoutine: Ptr): OSErr;
æFi UPatch
æT PROCEDURE
æC Head1Patch patches a system trap so that it calls the specified routine first,
then executes the old trap routine. Head1Patch returns noErr unless an error
occurs in allocating memory for the patch (memory for the patch is needed only
for 64K ROMs), in which case it returns a Memory Manager error code.
The parameter thePatch is the TrapPatch record that corresponds to the patch.
TrapPatch records are defined in the file UPatch.p. The parameter theTrapNum is
the number of the System trap that is to be patched. The parameter theRoutine
must refer to a rouine with one Longword argument.
MacApp uses Head1Patch to patch certain system traps when the application starts
up. You usually do not need to call this routine yourself. You can install your
own patches using Head1Patch, but such patches are extremely dangerous unless
you understand trap handling very well. Please read Macintosh® Technical Note
#25, “Don’t Depend on Register A5 Within Trap Patches,” before using Head1Patch.
æKY HeadPatch
æD FUNCTION HeadPatch (VAR thePatch: TrapPatch; theTrapNum: INTEGER;
theRoutine: Ptr): OSErr;
æFi UPatch
æT PROCEDURE
æC HeadPatch patches a system trap so that it calls the specified routine first,
then executes the old trap routine. HeadPatch returns noErr unless an error
occurs in allocating memory for the patch (memory for the patch is needed only
for 64K ROMs), in which case it returns a Memory Manager error code.The parameter
thePatch is the TrapPatch record that corresponds to the patch. TrapPatch records
are defined in the file UPatch.p.
The parameter theTrapNum is the number of the system trap that is to be patched.
The parameter theRoutine must refer to a routine with no arguments.
MacApp uses HeadPatch to patch certain system traps when the application starts
up. You usually do not need to call this routine yourself. You can install your
own patches using HeadPatch, but such patches are extremely dangerous unless you
understand trap handling very well. Please read Macintosh® Technical Note #25,
“Don’t Depend on Register A5 Within Trap Patches,” before using HeadPatch.
æKY HeapCmd
æD PROCEDURE HeapCmd;
æFi UDebug
æT PROCEDURE
æC HeapCmd prompts the user, reads input from the command line, and displays
heap information in the MacApp debugger in response to the user input.
HeapCmd is called by the global routine DoWaiting when the user enters an “H”
while in the MacApp debugger. This routine is intended for internal use by MacApp;
you never need to call it yourself.
æKY IdleProcForTStdPrintHandler
æD PROCEDURE IdleProcForTStdPrintHandler;
æFi UPrinting
æT PROCEDURE
æC IdleProcForTStdPrintHandler forwards print-job idle time to the DoPrintIdling
method of the current job's print handler.
The system calls this routine from TStdPrintHandler.PosePrintDialog when the
application is printing. You never need to call this routine yourself.
æKY IDUDebug
æD PROCEDURE IDUDebug;
æFi UDebug
æT PROCEDURE
æC IDUDebug retrieves the data and time that UDebug was compiled and writes this
information to the Debug Transcript.
MacApp calls IDUDebug from TApplication.IdentifySoftware. You usually do not
need to call this routine yourself.
æKY IDUobject
æD PROCEDURE IDUobject;
æFi UObject
æT PROCEDURE
æC IDUobject retrieves the data and time that UObject was compiled and writes
this information to the Debug Transcript.
MacApp calls IDUobject from TApplication.IdentifySoftware. You usually do not
need to call this routine yourself.
æKY IDUTranscriptView
æD PROCEDURE IDUTranscriptView;
æFi UTranscriptView
æT PROCEDURE
æC IDUTranscriptView retrieves the data and time that UTranscriptView was compiled
and writes this information to the Debug Transcript.
MacApp calls IDUTranscriptView from TApplication.IdentifySoftware. You usually
do not need to call this routine yourself.
æKY InitializationThatMustNotFail
æD PROCEDURE InitializationThatMustNotFail;
æFi UMacApp.Globals
æT PROCEDURE
æC InitializationThatMustNotFail resets the floating-point unit, calls InitUPatch,
and initializes several global variables.
MacApp calls this routine from the global routine InitUMacApp at startup; this
routine must complete its tasks successfully in order for MacApp to complete its
initialization. You never need to call this routine.
æKY InitMacAppCursor
æD PROCEDURE InitMacAppCursor;
æFi UBusyCursor
æT PROCEDURE
æC InitMacAppCursor installs the standard arrow cursor.
MacApp calls InitMacAppCursor when the application starts up. You usually do not
need to call this routine yourself, but you can use it to ensure that the standard
arrow cursor is installed.
æKY InitPrinting
æD PROCEDURE InitPrinting;
æFi UPrinting
æT PROCEDURE
æC InitPrinting is another name for the routine InitUPrinting, which initializes
the MacApp printing unit.
If you want to support printing, you must call InitPrinting or InitUPrinting
once at the beginning of your program, before you use any of the MacApp printing
routines.
æKY InitToolBox
æD PROCEDURE InitToolBox;
æFi UMacAppUtilities
æT PROCEDURE
æC InitToolBox initializes the Toolbox for the application.
You must call InitToolBox once at the beginning of your program to provide Toolbox
support for the application.
æKY InitUBusyCursor
æD PROCEDURE InitUBusyCursor;
æFi UBusyCursor
æT PROCEDURE
æC InitUBusyCursor initializes the UBusyCursor unit. This routine sets the values
of certain MacApp global variables and installs some patches.
MacApp calls InitUBusyCursor when the application starts up. You do not need to
call this routine yourself.
æKY InitUDebug
æD PROCEDURE InitUDebug (segTable, nonRes : Handle ;
enterProc, inspectProc, symbolProc: Ptr);
æFi UDebug
æT PROCEDURE
æC InitUDebug initializes the UDebug unit. This routine sets the values of certain
MacApp global variables.
MacApp calls InitUDebug when the application starts up, if the application was
compiled with debugging enabled. You do not need to call this routine yourself.
æKY InitUDebugAfterIApplication
æD PROCEDURE InitUDebugAfterIApplication;
æFi UDebug
æT PROCEDURE
æC InitUDebugAfterIApplication finishes the initialization of the UDebug unit
after UApplication is initialized.
MacApp calls InitUDebugAfterIApplication when the application starts up. You
never call this routine yourself.
æKY InitUDialog
æD PROCEDURE InitUDialog;
æFi UDialog
æT PROCEDURE
æC InitUDialog initializes the UDialog unit. It sets the values of certain MacApp
global variables and registers the view types associated with TDialogView and
TControl objects.
If you include the UDialog unit in your application, then you must call InitUDialog
once before creating any TDialogView objects.
æKY InitUGridView
æD PROCEDURE InitUGridView;
æFi UGridView
æT PROCEDURE
æC InitUGridView initializes the UGridView unit. It sets the values of certain
MacApp global variables.
If you include the UGridView unit in your application, then you must call InitUGridView
once before creating any TGridView objects.
æKY InitUInspector
æD PROCEDURE InitUInspector;
æFi UInspector
æT PROCEDURE
æC InitUInspector initializes the UInspector unit. It sets the values of certain
MacApp global variables.
MacApp calls InitUInspector when the application starts up, if it was compiled
with debugging enabled. You do not need to call this routine yourself.
æKY InitUMacApp
æD PROCEDURE InitUMacApp (callsToMoreMasters: INTEGER);
æFi UMacApp
æT PROCEDURE
æC InitUMacApp initializes the UMacApp unit.
The parameter callsToMoreMasters specifies the number of times MacApp will call
the MoreMasters routine to allocate master pointers.
MacApp never calls this routine. You must call InitUMacApp at the beginning of
your program, after calling the global routines InitToolBox and ValidateConfiguration.
æKY InitUMemory
æD PROCEDURE InitUMemory;
æFi UMemory
æT PROCEDURE
æC InitUMemory initializes the UMemory unit.MacApp calls InitUMemory from InitUMacApp.
You never need to call this routine yourself.
æKY InitUMenuSetup
æD PROCEDURE InitUMenuSetup;
æFi UMenuSetup
æT PROCEDURE
æC InitUMenuSetup initializes the UMenuSetup unit.
MacApp calls InitUMenuSetup for you. You do not need to call this routine yourself.
æKY InitUObject
æD PROCEDURE InitUObject;
æFi UObject
æT PROCEDURE
æC InitUObject initializes the UObject unit.
MacApp calls InitUObject from the global routine InitUMacApp. You do not need to
call this routine yourself.MacApp calls InitUMenuSetup for you. You do not need
to call this routine yourself.
æKY InitUPatch
æD PROCEDURE InitUPatch;
æFi UPatch
æT PROCEDURE
æC InitUPatch initializes the global linked list of trap patches.
MacApp calls InitUPatch when the application starts up. You do not need to call
this routine yourself.
æKY InitUPrinting
æD PROCEDURE InitUPrinting;
æFi UPrinting
æT PROCEDURE
æC InitUPrinting initializes the UPrinting unit.
If you want to support printing, you must call InitPrinting or InitUPrinting
once at the beginning of your program, before you use any of the MacApp printing
routines.
æKY InitUTEView
æD PROCEDURE InitUTEView;
æFi UTEView
æT PROCEDURE
æC InitUTEView initializes the UTEView unit.
You must call InitUTEView once at the beginning of your program, before using
any of the methods from TTEView or its subclasses.
æKY InsetVRect
æD PROCEDURE InsetVRect (VAR r: VRect; dh, dv: VCoordinate);
æFi UViewCoords
æT PROCEDURE
æC InsetVRect insets a view rectangle by the horizontal and vertical amounts
specified and returns the resulting rectangle in the parameter r.
The parameter r is the rectangle to be inset when the routine is called; it
contains the resulting rectangle when InsetVRect returns. The dh parameter is
the number of pixels that the rectangle is to be inset horizontally, and the dv
parameter is the number of pixels the rectangle is to be inset vertically.
æKY InspectField
æD PROCEDURE InspectField(fieldName: Str255; fieldAddr: Ptr; fieldType: INTEGER);
æFi UObject
æT PROCEDURE
æC InspectField displays the name of the specified field and its current value
in the Debug Transcript.
The parameter fieldName is the name of the field being inspected. The parameter
fieldAddr is a pointer to the field. The fieldType parameter is the type identifier
for the field. MacApp defines a large set of global constants as field type
identifiers.
MacApp calls InspectField from several methods of the TObjectView class to display
the contents of inspected fields. You usually do not need to call this routine
yourself.
æKY InspectObject
æD PROCEDURE InspectObject (obj: TObject);
æFi UObject
æT PROCEDURE
æC InspectObject displays the specified object’s name and the values of its
fields in the Debug Transcript.
The parameter obj is the object that is to be displayed.
MacApp calls InspectObject in response to a MacApp debugger command to
inspect a specified object. You do not need to call this routine yourself.
æKY InstallAnNMRequest
æD PROCEDURE InstallAnNMRequest;
æFi UDebug
æT PROCEDURE
æC InstallAnNMRequest installs a Notification Manager request. The system responds
by displaying a small icon that blinks in the menu bar at the location of the
Apple menu.
This routine is intended for MacApp’s internal use; you never need to call it yourself.
æKY InstallDispatcher
æD PROCEDURE InstallDispatcher;
æFi UObject
æT PROCEDURE
æC InstallDispatcher installs the MacApp method dispatcher.
MacApp calls InstallDispatcher from the global routine InitUObject. This routine
is intended for internal use by MacApp; you never need to call it yourself.
æKY InstallGrowZoneProc
æD PROCEDURE InstallGrowZoneProc;
æFi UMemory
æT PROCEDURE
æC InstallGrowZoneProc installs the GrowZoneProc routine; once called, the GrowZoneProc’s
segment must not be moved because InstallGrowZoneProc passes an address that is
not a jump-table address to the Toolbox routine SetGrowZone.
MacApp calls InstallGrowZoneProc once when initializing the UMemory unit. You
never need to call this routine yourself.
æKY InstallIfPrintHandler
æD PROCEDURE InstallIfPrintHandler(aView: TView);
æFi UMacApp.Globals
æT PROCEDURE
æC InstallIfPrintHandler installs a clone of the specified TPrintHandler object,
if it exists, in the specified view. If the UPrinting unit has been initialized,
then the global variable gPrintHandler is a TStdPrintHandler object. Otherwise,
gPrintHandler is gNullPrintHandler, and the routine does not install a print
handler.
The parameter aView is the TView object in which the print handler is to
be installed.
Debugging versions of MacApp applications call InstallIfPrintHandler
with the global variable pDebugView as the argument. This call installs the
standard debugging print handler in the Debug Transcript. You usually do not
need to call this routine yourself.
æKY InstallInterceptors
æD PROCEDURE InstallInterceptors(install: BOOLEAN);
æFi UDebug
æT PROCEDURE
æC InstallInterceptors installs or removes a group of low-level exception handlers.
If the value of the install parameter is TRUE, then MacApp installs the exception
handlers; otherwise, it removes them.
MacApp calls InstallInterceptors from certain debugging method s that change the
Macintosh exception-handling vectors. This routine is intended for internal use
by MacApp; you never need to call it yourself.
æKY InstallWriteLnHook
æD PROCEDURE InstallWriteLnHook;
æFi UDebug
æT PROCEDURE
æC InstallWriteLnHook installs a routine to handle the Pascal WriteLn routine
when Debugging is enabled.
MacApp calls InstallWriteLnHook when debugging versions of MacApp applications
start up. This routine is intended for internal use by MacApp; you never need to
call it yourself.
æKY IntMultiply
æD FUNCTION IntMultiply(x, y: INTEGER): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC IntMultiply multiplies together two integers and returns a LongInt result.
This routine corrects certain casting errors that can occur when you multiply
two integers, or one integer and one LongInt value using the multiplication
operator. The x and y parameters are the two Integer values that are to be multiplied.
MacApp calls IntMultiply to perform a variety of computations. You can use this
routine whenever you need to multiply two integers without any loss of precision.
æKY InvalidateMenuBar
æD PROCEDURE InvalidateMenuBar;
æFi UMenuSetup
æT PROCEDURE
æC InvalidateMenuBar sets the value of gRedrawMenuBar to TRUE and invalidates
the menu items as well.
MacApp calls this routine when setting up menus or when handling events that affect
the appearance of the menus. You can use this routine in a similar fashion.
æKY InvalidateMenus
æD PROCEDURE InvalidateMenus;
æFi UMenuSetup
æT PROCEDURE
æC InvalidateMenus sets the value of gMenusAreSetup to FALSE, which invalidates
all of the items on all of the menus. Note that this does not cause an immediate
change in their appearance; like an invalidated view, the menu item is simply
marked as needing to be updated.
MacApp calls this routine after handling an event that affects the appearance of
any menu item; for example, many commands cause the Undo or Redo menu item to be
updated. You usually do not need to call this routine yourself.
æKY IsClassIDMemberClass
æD FUNCTION IsClassIDMemberClass(testClass: ObjClassID;
superClass: ObjClassID): BOOLEAN;
æFi UObject
æT PROCEDURE
æC IsClassIDMemberClass returns TRUE if the class being tested is a subclass of
the specified superclass.
The testClass parameter is the class identifier of the class to be tested. The
superClass parameter is the class identifier of the superclass to be tested.
MacApp calls IsClassIDMemberClass from methods whose behavior depends on the
superclass of an object. You can use this routine in a similar fashion.
æKY IsFreeHandle
æD FUNCTION IsFreeHandle(h: UNIV Handle): Boolean;
æFi UMacAppUtilities
æT PROCEDURE
æC IsFreeHandle traverses the application’s global list of free handles and
returns TRUE if it finds the specified handle in the list.
The h parameter specifies the handle to be found.
MacApp calls IsFreeHandle in debugging versions of applications from certain
global routines. For example, MacApp calls IsFreeHandle from InspectObject and
from ShowFields; it also calls IsFreeHandle when it dtermines whether a handle
is an object reference. You usually do not need to call IsFreeHandle yourself.
æKY IsHandle
æD FUNCTION IsHandle(h: UNIV Handle): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC IsHandle returns TRUE if the specified parameter is a valid handle.
The h parameter is the data value to be tested.
MacApp calls IsHandle from the global routine IsObject. You can use this routine
to determine whether a data value is a valid handle.
æKY IsHandleLocked
æD FUNCTION IsHandleLocked(h: UNIV Handle): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC IsHandleLocked returns TRUE if the specified handle is locked.
The parameter h is the handle that is to be checked.
MacApp calls IsHandleLocked from routines that determine whether a handle is
locked. You can use this routine in a similar fashion.
æKY IsHandlePurged
æD FUNCTION IsHandlePurged(h: UNIV Handle): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC IsHandlePurged returns TRUE if the handle has been purged—that is, if the
master pointer is NIL.
The parameter h is the handle that is to be checked.
MacApp calls IsHandlePurged from routines that use handles in their operations.
You can use this routine when you need to determine whether a handle is associated
with active data or has been purged.
æKY IsMemberClassID
æD FUNCTION IsMemberClassID(obj: TObject; objID: ObjClassID): BOOLEAN;
æFi UObject
æT PROCEDURE
æC IsMemberClassID returns TRUE if the specified object is an instance of the
specified class or one of its subclasses.
The parameter obj is the object to be tested. The parameter objID is the class
that is to be tested.
MacApp calls IsMemberClassID from methods whose behavior depends on the class of
an object. You can use this routine in a similar fashion.
æKY IsObject
æD FUNCTION IsObject(obj: UNIV TObject): BOOLEAN;
æFi UObject
æT PROCEDURE
æC IsObject returns TRUE if the specified value is a reference to an object.
The parameter obj is the the value to be tested.
MacApp calls IsObject from methods and global routines whose behavior depends on
an argument referring to an object. You can use this routine when you must ensure
that a value is an object.
æKY IsUserBreak
æD FUNCTION IsUserBreak: BOOLEAN;
æFi UDebug
æT PROCEDURE
æC IsUserBreak returns TRUE if the user has activated the debugger by simultaneously
pressing the Command, Shift, and Option keys.
MacApp calls IsUserBreak when the MacApp debugger needs to determine whether it
was activated by a program failure or breakpoint or by a user’s explicit request.
You do not need to call this routine yourself.
æKY JTOffProc
æD PROCEDURE JTOffProc(A5JTOffset: UNIV INTEGER; VAR s: UNIV DisAsmStr80);
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY LengthRect
æD FUNCTION LengthRect(r: Rect; vhs: VHSelect): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC LengthRect returns the length of the specified rectangle in the specified
dimension.
The parameter r is the rectangle whose length is to be determined. If the value
of vhs is v, then MacApp computes the vertical dimension of the rectangle; if
the value of vhs is h, then MacApp computes the horizontal dimension.
MacApp calls LengthRect from TTEView.ScrollSelectionIntoView. You can use this routine
when you need to determine the size of a rectangle in a particular dimension.
æKY LengthVRect
æD FUNCTION LengthVRect(r: VRect; vhs: VHSelect): VCoordinate;
æFi UViewCoords
æT PROCEDURE
æC LengthVRect returns the length of the specified view rectangle in the specified
dimension.
The parameter r is the rectangle whose length is to be determined. If the value
of vhs is v, then MacApp computes the vertical dimension of the rectangle; if
the value of vhs is h, then MacApp computes the horizontal dimension.
MacApp calls LengthVRect from TScroller.RevealRect. You can use this routine
when you need to determine the size of a view rectangle in a specified dimension.
æKY LIntToHex
æD PROCEDURE LIntToHex(decNumber: UNIV LONGINT; VAR hexNumber: String8;
noOfDigits: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC LIntToHex converts a decimal number to a string that represents the number in
hexadecimal format.
The decNumber parameter is the number to be converted. The hexNumber parameter
stores the resulting string. The noOfDigits parameter specifies the number of
characters in the resulting string.
MacApp calls LIntToHex when it must convert a number for display in hexadecimal
format. You can use this routine in a similar fashion.
æKY LoadMacAppSegment
æD FUNCTION LoadMacAppSegment(segnum: INTEGER): LONGINT;
æFi UMemory
æT PROCEDURE
æC LoadMacAppSegment loads the specified code segment into memory.
The segnum parameter is the segment number of the segment to be loaded.
MacApp calls LoadMacAppSegment from the patch to LoadSeg that it installs when
the application starts up. Do not call LoadMacAppSegment yourself.
æKY LoadResidentSegments
æD PROCEDURE LoadResidentSegments;
æFi UMemory
æT PROCEDURE
æC LoadResidentSegments loads all resident code segments into memory.
MacApp calls LoadResidentSegments from the global routine InitUMacApp. You do
not need to call this routine yourself.
æKY LockHandleHigh
æD PROCEDURE LockHandleHigh(h: Handle);
æFi UMacAppUtilities
æT PROCEDURE
æC LockHandleHigh moves the specified relocatable block toward the top of the
current heap zone until the block hits either a nonrelocatable block, a locked
relocatable block, or the last block in the current heap zone. It then locks
this block, preventing it from being moved within its heap zone. This routine
ignores NIL handles.
The h parameter is the handle of the block to be moved and locked.
MacApp calls this routine from several methods that directly manipulate memory.
You can use this routine to avoid heap fragmentation and make room for future
pointers as low on the heap as possible.
æKY LongerSide
æD FUNCTION LongerSide(VAR r: Rect): VHSelect;
æFi UMacAppUtilities
æT PROCEDURE
æC LongerSide returns a value that indicates whether the specified rectangle is
longer in the horizontal or the vertical dimension. If the resulting value is v,
then the rectangle is larger in the vertical dimension; if the value is h, then
it is longer in the horizontal dimension.
The r parameter is the rectangle to be examined.
MacApp calls LongerSide from TGridView.CellsToPixels. You can use this routine
when you need to determine whether a rectangle is longer in the horizontal or
vertical dimension.
æKY LookupErrString
æD FUNCTION LookupErrString(value: INTEGER; resourceID: INTEGER;
VAR str: Str255): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC LookupErrString searches a specified error string resource for a string associated
with a specified error number, returning TRUE if it finds the string.
The value parameter is the error number whose associated string is to be found.
The resourceID parameter is the identifier of an 'errs' resource to be searched.
The str parameter stores the associated string if it finds one. If MacApp does
not find a string associated with the specified error number, then it stores the
empty string in the str parameter and returns FALSE.
MacApp calls LookupErrString from the global routine ErrorAlert. You usually do
not need to call this routine yourself.
æKY LookupSymbol
æD FUNCTION LookupSymbol(VAR sym: Str255): LONGINT;
æFi UMacApp
æT PROCEDURE
æC LookupSymbol returns the address of the global variable with the specified
name.
The sym parameter is the name of the variable that MacApp is ot look up.
MacApp calls LookupSymbol from routines that must gain access to variables from
their names. You can use this routine in a similar fashion.
æKY LowerChar
æD FUNCTION LowerChar(ch: CHAR): CHAR;
æFi UMacAppUtilities
æT PROCEDURE
æC LowerChar converts the specified character to its lowercase equivalent.
The ch parameter is the character that is to be converted. If the character is
already lowercase, then it is returned unchanged.
MacApp calls LowerChar when it must replace uppercase characters with their
lowercase equivalents. You can use this routine in a similar fashion.
æKY LowerStr255
æD PROCEDURE LowerStr255(VAR s: Str255);
æFi UMacAppUtilities
æT PROCEDURE
æC LowerStr255 converts all the characters in a string to their lowercase equivalents.
The s parameter is the string that LowerStr255 is to convert. The routine stores
the converted string in the s parameter when it returns.
You can use LowerStr255 when you need to convert all a string’s characters to
lowercase.
æKY MacAppAlert
æD FUNCTION MacAppAlert(alertID: INTEGER; filterProc: ProcPtr): INTEGER;
æFi UMacApp
æT PROCEDURE
æC MacAppAlert displays an alert box after first ensuring that the cursor image
is restored to the standard arrow. The routine returns a condition code that is
produced by the Toolbox routine Alert; for information on the Alert routine, see
Inside Macintosh, Volume I, page 418.
The alertID parameter is the resource ID of the 'ALRT' resource that MacApp uses
to create the alert box. The filterProc parameter determines how events are
filtered. If the value of filterProc is NIL, then a standard filterProc routine
is executed. If the value of filterProc is not NIL, then Alert filters events by
executing the routine it points to. For information about filterProc routines,
see Inside Macintosh, Volume I, page 415.
MacApp calls MacAppAlert when it must report a problem to the user. You can use
this routine in a similar fashion.
æKY MacAppAlertFilter
æD FUNCTION MacAppAlertFilter(theDialog: DialogPtr; VAR theEvent:EventRecord;
VAR itemHit: INTEGER): BOOLEAN;
æFi UMacApp.Globals
æT PROCEDURE
æC MacAppAlertFilter maps keystrokes to the first character of button labels.
The parameter theDialog is a pointer to the specified dialog’s record. The parameter
theEvent is the event in the Toolbox event record that the filterProc must process.
The itemHit parameter specifies the control that was selected in the dialog box,
if any; in the case of an alert box, it is usually a hit on the OK button that
dismisses the alert box.
MacApp assigns NIL to gMacAppAlertFilter when initializing the application object
to specify the routine used by the global routine MacAppAlert. You can assign
gMacAppAlertFilter equual to @MacAppAlertFilter after you call IApplication.
æKY MACount1Resources
æD FUNCTION MACount1Resources(rType: ResType): INTEGER;
æFi UMemory
æT PROCEDURE
æC MACount1Resources returns the number of resources of the specified type that
are present only in the resource file referenced by the global variable gCodeRefNum.
This file is the application’s resource file.
The rType parameter indicates the type of resource that this routine counts.
MacApp calls this routine from the global routine DoInitUMemory to determine the
number of code segments loaded. You can use this routine to count resources of a
specified type in the application’s resource fork.
æKY MACountResources
æD FUNCTION MACountResources(rType: ResType): INTEGER;
æFi UMemory
æT PROCEDURE
æC MACountResources returns the number of resources of the specified type that
are present in a specific search path. This routine searches the file referenced
by gCodeRefNum and all resource files opened before it. Files are searched in
the reverse of the order in which they were opened; the system resource file is
searched last. Because gCodeRefNum usually refers to the file containing the
application’s resources, using this search path has the effect of searching
through the resources that need to be in the application rather than in the
document. (Document files are opened after the application file; they are therefore
not included in this search.)
The rType parameter indicates the type of resource that this routine counts.
MacApp calls this routine from the global routine DoInitUMemory to determine the
number of code segments loaded. You can use this routine to count resources of a
specified type starting with the application’s resource file.
æKY MADebuggerMainEntry
æD PROCEDURE MADebuggerMainEntry(aWhich: ZT; aPLink, aPpc: Longint);
æFi UDebug
æT PROCEDURE
æC MADebuggerMainEntry is a utility routine used by the MacApp debugger to handle
entry into the debugger, breakpoints, trace commands, and queries about the
number of free master pointers in memory.
The aWhich parameter specifies the context from which MacApp enters the debugger.
Legal values include tBegin, tBeginEndPair, tProgBreak, tSysError, tVBL, and
tReadLn. The aPLink and aPpc parameters specify the values of the stack pointer
and program counter, respectively.
MADebuggerMainEntry is called by several low-level global routines that interact
with the debugger. You never need to call this routine yourself.
æKY MADrawString
æD PROCEDURE MADrawString(s: StringPtr; box: Rect; justification: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC MADrawString calls the Toolbox routine DrawString for you. MADrawString improves
on DrawString by giving you control over the bounds into which the text is drawn,
allowing you to specify justification, and drawing non-Roman script text in the
correct direction.
The s parameter is the address of the text to be drawn. The box parameter specifies
the location, in local coordinates, of the rectangle in which each character is
to be drawn; the value specified in this parameter should be at least as wide as
the first character to be drawn—about 20 pixels is usually a good minimum width.
The justification parameter specifies the justification with which the text is
to be drawn; legal values are the constants teJustLeft, teJustCenter, teJustRight,
and teForceLeft.
MacApp calls MADrawString from methods that draw text for use in pop-up menus,
page adornments, and TTextGridView objects. You can use this routine in a similar
fashion.
æKY MAGet1IndResource
æD FUNCTION MAGet1IndResource(rType: ResType; index: INTEGER): Handle;
æFi UMemory
æT PROCEDURE
æC MAGet1IndResource returns a handle to a resource specified by type and index;
this routine accomplishes the same task as MAGetIndResource except that it searches
only the file specified by gCodeRefNum. (This file usually contains the application’s
code segments.) This routine reads the resource data into memory if it is not
already in memory, unless you have called the Toolbox routine SetResLoad with
the argument FALSE.
Warning: The handle returned will be an empty handle if you have called SetResLoad(FALSE).
If MAGet1IndResource does not find the resource, it returns NIL and the Toolbox
function ResError returns the result code resNotFound. MAGet1IndResource also
returns NIL if the resource is to be read into memory but won't fit; in this
case, ResError returns an appropriate operating-system result code.
The rType parameter indicates the type of resource to be found. The index
parameter specifies the resource ID.
MacApp calls this routine from the global routine DoInitUMemory to determine the
number of code segments loaded. You can use this routine to obtain a handle to a
specified resource. For more information, see the Resource Manager chapters of
Inside Macintosh, Volumes I and IV.
æKY MAGet1NamedResource
æD FUNCTION MAGet1NamedResource(rType: ResType; name: Str255): Handle;
æFi UMemory
æT PROCEDURE
æC MAGet1NamedResource returns a handle to the resource having the specified
type and name; this routine accomplishes the same task as MAGetNamedResource,
except that it searches only the file specified by gCodeRefNum (that is, the
application’s resource fork). MAGet1NamedResource reads the resource data into
memory if it is not already in memory, unless you have called the Toolbox routine
SetResLoad with the argument FALSE.
Warning: The handle returned will be an empty handle if you have called SetResLoad
with the argument FALSE.
If MAGet1NamedResource does not find the resource, it returns NIL and the Toolbox
function ResError returns the result code resNotFound. MAGet1NamedResource also
returns NIL if the resource is to be read into memory but won't fit; in this
case, ResError returns an appropriate operating-system result code.
The rType parameter indicates the type of resource to be found. The name parameter
is a string indicating the name of the resource to be found.
MacApp calls MAGet1NamedResource from several methods that load resources specified
by name. You can use this routine in a similar fashion.
æKY MAGet1Resource
æD FUNCTION MAGet1Resource(rType: ResType; rID: INTEGER): Handle;
æFi UMemory
æT PROCEDURE
æC MAGet1Resource returns a handle to the resource having the specified type and
ID number; this routine accomplishes the same task as MAGetResource except that
it searches only the file specified by gCodeRefNum (that is, the resource fork
that contains the code resources for the application). This routine reads the
resource data into memory if it is not already in memory, unless you have called
the Toolbox routine SetResLoad with the argument FALSE.
Warning: The handle returned will be an empty handle if you have called SetResLoad
with the argument FALSE.
If MAGet1Resource does not find the resource, it returns NIL and the
Toolbox function ResError returns the result code resNotFound. MAGet1Resource
also returns NIL if the resource is to be read into memory but won't fit; in
this case, ResError returns an appropriate operating-system result code.
The rType parameter indicates the type of resource to be found. The rID parameter
is the resource ID of the resource to be found.
MacApp calls MAGet1Resource from several methods that load resources specified
by resource type and ID. You can use this routine in a similar fashion.
æKY MAGetIndResource
æD FUNCTION MAGetIndResource(rType: ResType; index: INTEGER): Handle;
æFi UMemory
æT PROCEDURE
æC MAGetIndResource returns a handle to the first resource having the specified
type and resource index in an open resource file. The routine searches for the
resource by starting at the resource fork that contains the code resources for
the application (specified by gCodeRefNum), and then continuing the search through
the resource chain. This routine reads the resource data into memory if it is
not already in memory, unless you have called the Toolbox routine SetResLoad
with the argument FALSE.
Warning: The handle returned will be an empty handle if you have called SetResLoad
with the argument FALSE.
If MAGetIndResource does not
find the resource, it returns NIL and the Toolbox function ResError returns the
result code resNotFound. MAGetIndResource also returns NIL if the resource is to
be read into memory but won't fit; in this case, ResError returns an appropriate
operating-system result code.MAGetIndResource searches in the file referenced by
gCodeRefNum and all resource files opened before it. Files are searched in the
reverse of the order in which they were opened; the system resource file is
searched last. Because gCodeRefNum usually refers to the file containing the
application’s resources, using this search path has the effect of searching
through the resources that need to be in the application rather than in the
document. (Document files are opened after the application file; they are therefore
not included in this search.)
The rType parameter indicates the type of resource to be found. The index parameter
specifies the resource index.
MacApp calls this routine from the global routine DoInitUMemory to determine the
number of code segments loaded. You can use MAGetIndResource to obtain handles
to all of an application’s resources of a specified type by calling this routine
repeatedly over the entire range of the index. The range of the index is returned
by calling MACountResources. For more information, see the Resource Manager
chapters of Inside Macintosh, Volumes I and IV.
æKY MAGetMenu
æD FUNCTION MAGetMenu(menuNo: INTEGER): MenuHandle;
æFi UMenuSetup
æT PROCEDURE
æC MAGetMenu returns the handle to a menu you specify by menu ID number. This
routine is similar to the Toolbox routine GetMenu, except that MAGetMenu does
not attempt to load any resources unless the specified menu is not present in
the menu bar.
The menuNo parameter is the menu’s menu resource ID.
MacApp calls MAGetMenu from methods that set up menus and enable or disable menu
commands. You can use it to avoid calling GetMenu more than once when you need a
menu handle to a menu that may already be in memory.
æKY MAGetNamedResource
æD FUNCTION MAGetNamedResource(rType: ResType; name: Str255): Handle;
æFi UMemory
æT PROCEDURE
æC MAGetNamedResource returns a handle to the resource having the specified type
and name. (That is, MAGetNamedResource is the same as MAGetResource except that
you pass a resource name instead of an ID number.) This routine reads the resource
data into memory if it is not already in memory, unless you have called the
Toolbox routine SetResLoad with the argument FALSE. Warning: The handle returned
will be an empty handle if you have called SetResLoad with the argument FALSE.
If MAGetNamedResource does not find the resource, it returns NIL and the Toolbox
function ResError returns the result code resNotFound. MAGetNamedResource also
returns NIL if the resource is to be read into memory but won't fit; in this
case, ResError returns an appropriate operating-system result code. MAGetNamedResource
searches in the file referenced by gCodeRefNum and all resource files opened
before it. Files are searched in the reverse of the order in which they were
opened; the system resource file is searched last. Because gCodeRefNum usually
refers to the file containing the application’s resources, using this search
path has the effect of searching through the resources that need to be in the
application rather than in the document. (Document files are opened after the
application file; hence, they are not included in this search.) If it does not
find the resource, this routine returns NIL and the ResError function returns
the result code resNotFound.
The rType parameter indicates the type of resource to be found. The name parameter
is a string indicating the name of the resource to be found.
MacApp calls MAGetNamedResource from several methods that load resources
that are specified by name. You can use this routine in a similar fashion. For
more information, see the Resource Manager chapters of Inside Macintosh, Volumes
I and IV.
æKY MAGetNewMBar
æD FUNCTION MAGetNewMBar(menuRsrcID: INTEGER): Handle;
æFi UMenuSetup
æT PROCEDURE
æC MAGetNewMBar creates a menu bar and sets its colors, returning a handle to
the resulting menu bar.
The parameter menuRsrcID is the resource identifier of the menu bar resource
that MacApp uses to create the new menu bar.
MacApp calls MAGetNewMBar when the application starts up. You can use MAGetNewMBar
if you plan to keep multiple menu bars in your application.
æKY MAGetResource
æD FUNCTION MAGetResource(rType: ResType; rID: INTEGER): Handle;
æFi UMemory
æT PROCEDURE
æC MAGetResource returns a handle to the resource having the specified type and
ID number. This routine reads the resource data into memory if it is not already
in memory, unless you have called the Toolbox routine SetResLoad with the argument
FALSE.
Warning: The handle returned will be an empty handle if you have called
SetResLoad with the argument FALSE.
If MAGetResource does not find the resource, it returns NIL and the Toolbox
function ResError returns the result code resNotFound. MAGetResource also returns
NIL if the resource is to be read into memory but won't fit; in this case, ResError
returns an appropriate operating-system result code.MAGetResource searches in
the file referenced by gCodeRefNum and all resource files opened before it.
Files are searched in the reverse of the order in which they were opened; the
system resource file is searched last. Because gCodeRefNum usually refers to the
file containing the application’s resources, using this search path has the
effect of searching through the resources that need to be in the application
rather than in the document. (Document files are opened after the application
file; they are therefore not included in this search.) If it does not find the
resource, this routine returns NIL and the ResError function returns the result
code resNotFound.
The rType parameter indicates the type of resource to be found. The rID parameter
is the resource ID of the resource to be found.
MacApp calls MAGetResource from several methods that load resources specified
by resource type and ID. You can use this routine in a similar fashion. For more
information, see the Resource Manager chapters of Inside Macintosh, Volumes I
and IV.
æKY MainHelpProc
æD PROCEDURE MainHelpProc;
æFi UDebug
æT PROCEDURE
æC MainHelpProc displays a list of the MacApp debugger’s command options in the
Debug Transcript.MacApp calls MainHelpProc when the Debug Transcript is active
and the user types the question mark or the Help key.
You do not need to call this routine yourself.
æKY MAInsertMenu
æD PROCEDURE MAInsertMenu(theMenu: MenuHandle; beforeID: INTEGER);
æFi UMenuSetup
æT PROCEDURE
æC MAInsertMenu inserts menu in the menu bar before the specified menu. It also
searches for an 'mctb' resource whose resource ID is the menu’s ID; if it finds
such a resource, then the specified colors are associated with the menu.
The parameter theMenu is the menu handle of the menu to be inserted. The parameter
beforeID is the ID of a menu that is already installed; the newly installed menu
will appear before it in the menu bar. If the value of beforeID is 0, or if it
is not the ID of any menu in the menu bar, then the new menu is installed after
all other menus.
MAInsertMenu is called by the Draw and DoMouseCommand methods of the class TPopup.
You can call this routine to insert a menu at a specified place in the menu
bar.
æKY MAInvalMenuBar
æD PROCEDURE MAInvalMenuBar;
æFi UMenuSetup
æT PROCEDURE
æC This routine is not yet implemented; it will be implemented in a future
version of MacApp.
æKY MakeInspector
æD PROCEDURE MakeInspector;
æFi UInspector
æT PROCEDURE
æC MakeInspector creates a TInspector object. This object is the Inspector that
you use to inspect MacApp objects at run time.
MacApp calls MakeInspector when initializing a debugging version of an application.
You do not need to call this routine yourself.
æKY MakeInspectorWindow
æD PROCEDURE MakeInspectorWindow;
æFi UInspector
æT PROCEDURE
æC MakeInspectorWindow creates a TInspectWindow object to display the objects
that are active in the application.
MacApp calls MakeInspectorWindow when you select the New Inspector Window command
from the Debug menu. You do not need to call this routine yourself.
æKY MakeNewInstance
æD FUNCTION MakeNewInstance(classID: ObjClassId): TObject;
æFi UObject
æT PROCEDURE
æC MakeNewInstance creates an instance of the specified class.
The classID parameter is the identifier of the class to which the new object belongs.
MacApp calls MakeNewInstance when creating an instance of a class. You will not
need to call this routine yourself.
æKY MakeNewRgn
æD FUNCTION MakeNewRgn: RgnHandle;
æFi UMacApp
æT PROCEDURE
æC MakeNewRgn creates and returns a new region. If the system fails to allocate
the memory required for the region, then the routine signals failure.
MacApp calls MakeNewRgn from a variety of routines that manipulate regions. You
can use this routine when you need to create a region.
æKY MAOpenFile
æD FUNCTION MAOpenFile(name: Str255; volRefnum: INTEGER; openData, openRsrc: BOOLEAN;
dataPerm, rsrcPerm: INTEGER; VAR dataRefnum, rsrcRefnum: INTEGER): OSErr;
æFi UMacAppUtilities
æT PROCEDURE
æC MAOpenFile opens the specified forks of the file using the specified permissions.
It returns various error codes depending on what happens when it tries to open
the file. If the file cannot be opened, or if the resource fork does not exist,
then MAOpenFile returns kNoFileRefnum. For any other error, MAOpenFile returns
an operating system error. If the file is opened without an error, then the
routine returns noErr.
The name parameter is the name of the file to be opened. The volRefnum parameter
is the volume reference number of the volume that contains the file. If the
value of the openData parameter is TRUE, then the routine tries to open the data
fork of the file; if the value of the openRsrc parameter is TRUE, then it tries
to open the resource fork. The dataPerm and rsrcPerm parameters are the permission
codes that MacApp uses in trying to open the file’s data and resource forks. For
more information about file access permissions, see Inside Macintosh, Volume V,
pages 397–398 . MAOpenFile stores the HFS reference number for the file’s data
fork in the dataRefnum parameter, and stores the reference number for the resource
fork in rsrcRefnum.
MacApp calls MAOpenFile from TDocument.OpenAFile. You can use this routine in
methods that must open a file.
æKY MATextBox
æD PROCEDURE MATextBox(text: Ptr; itsLength: longint; box: Rect;itsJust: INTEGER;
autoWrap: Boolean; wordBreak: ProcPtr; eraseFirst: Boolean; spaceForCaret: Boolean);;
æFi UMacAppUtilities
æT PROCEDURE
æC MATextBox draws the specified text with the specified justification in the
rectangle indicated by the box parameter. MATextBox does not create an edit
record; hence, you cannot edit the text it draws unless you are drawing in a
TEditText view.
The text parameter is a pointer to the text to be drawn; because Pascal strings
begin with a length byte, the address you pass in this parameter should be one
position past the beginning of the string in order to point to the start of the
text. The itsLength parameter indicates the number of characters to be drawn.
The box parameter specifies in local coordinates the rectangle in which the
characters are to be drawn; the value specified in this parameter should be at
least as wide as the first character to be drawn—about 20 pixels is usually a
good minimum width. The itsJust parameter specifies the text’s justification.
Set the autoWrap parameter to TRUE if you want to word-wrap. The wordBreak parameter
is the address of the procedure used to determine where word breaks occur; set
this parameter to NIL if you want to use TextEdit’s default word-wrap routine.
Set the value of the eraseFirst parameter to TRUE if you want to erase the rectangle
before drawing. The spaceForCaret parameter allows you to adjust the text drawn
by one pixel on either side in order to account for the space occupied by the
caret if there is one; you usually will set the value of this parameter to TRUE
if the text can be edited or can become editable (as with a TEditText view). If
the text cannot be edited, as with a control label or TStaticText object, you
usually do not need to leave space for a caret.
MacApp calls MATextBox from methods that draw text for a variety of purposes,
including use in dialog boxes, control clusters, editable text views, and static
text strings. You can use this routine to draw text also.
For further information about justification, see the discussion of Edit Records
in the Text Edit chapter of Inside Macintosh, Volume V; also see the Text Edit
section of the chapter entitled “The User Interface Toolbox” in The Programmer’s
Introduction to the Macintosh Family. For details about the FontInfo data type,
see the Quick Draw chapter of Inside Macintosh, Volume I.
æKY MAUseResFile
æD FUNCTION MAUseResFile(refNum: INTEGER): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC MAUseResFile sets the current resource file to the specified file and returns
the old setting of the resource file by calling the Toolbox routine CurResFile.
If no open resource file has the specified reference number, this routine does
nothing and the Toolbox function ResErr returns the result code resFNotFound.
The refNum parameter is the reference number of the specified resource file. A
value of 0 represents the system resource file.
MacApp calls MAUseResFile from several methods that manipulate resources. You
can use this routine to specify a particular resource file as the current resource
file.
æKY Max
æD FUNCTION Max(a, b: LONGINT): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC Max returns the greater of its two arguments.
The parameters a and b are the values to be compared.
MacApp calls Max from a variety of routines that compare numeric values. You can
use this routine in a similar fashion.
æKY MemSpaceIsLow
æD FUNCTION MemSpaceIsLow: BOOLEAN;
æFi UMemory
æT PROCEDURE
æC MemSpaceIsLow returns TRUE if the amount of free memory is dangerously small.
MacApp calls MemSpaceIsLow from several routines that depend on the availability
of free memory to function correctly. You can use this routine when you need to
determine whether free memory is in critically short supply.
æKY MenuBarHasPendingUpdate
æD FUNCTION MenuBarHasPendingUpdate: BOOLEAN;
æFi UMenuSetup
æT PROCEDURE
æC MenuBarHasPendingUpdate returns TRUE if the menu bar is invalid and should be
redrawn.
MacApp calls this routine when setting up the menus or when handling events that
affect the appearance of menu titles in the menu bar. You can use this routine
in a similar fashion.
æKY MenusHavePendingUpdate
æD FUNCTION MenusHavePendingUpdate: BOOLEAN;
æFi UMenuSetup
æT PROCEDURE
æC MenusHavePendingUpdate returns TRUE if any menu item is invalid and needs to
be redrawn.
MacApp calls this routine when setting up the menus. You can use this routine to
determine whether there are menu items that need to be redrawn.
æKY Min
æD FUNCTION Min(a, b: LONGINT): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC Min returns the lesser of its two arguments.
The parameters a and b are the values to be compared.
MacApp calls Min from a variety of routines that compare two numeric values. You
can use this routine in a similar fashion.
æKY MinMax
æD FUNCTION MinMax(MinVal, expression, MaxVal: LONGINT): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC MinMax returns the value of the specified expression unless it is greater
than the specified maximum or less than the specified minimum.
If the value of the expression is less than the value of MinVal, then MinVal is
returned. If the value of the expression is greater than the value of MaxVal,
then MaxVal is returned. Otherwise, the value of the expression parameter itself
is returned.
You can call MinMaxwhen you need to ensure that a numeric value is within a
specified range.
æKY NeedCalcMenuSize
æD PROCEDURE NeedCalcMenuSize(aMenuHandle: MenuHandle);
æFi UMenuSetup
æT PROCEDURE
æC NeedCalcMenuSize ensures that the application makes the Toolbox call CalcMenuSize
appropriately when changing the specified menu.
The parameter aMenuHandle is a handle to the menu whose size is to be calculated.
You must call NeedCalcMenuSize for any menu that you change by directly inserting
or deleting items. You do not need to call this routine if you do all menu manipulation
using only the routines defined in the UMenuSetup unit.
æKY NewAllocatedList
æD FUNCTION NewAllocatedList(iSize: ArrayIndex): TList;
æFi UList
æT PROCEDURE
æC NewAllocatedList creates a TList object having the specified array size; it
then initializes and returns the object.
The iSize parameter specifies the initial number of elements in the TList object’s
array.
MacApp never calls this routine; it is provided for your convenience. You can
call it to create a new TList object having a specified initial size.
æKY NewList
æD FUNCTION NewList: TList;
æFi UList
æT PROCEDURE
æC NewList creates a TList object, initializes it, and returns it.
MacApp calls NewList from a variety of routines that generate TList objects. You
can call it to create a new TList object.
æKY NewObjectByClassId
æD FUNCTION NewObjectByClassId(classID: ObjClassID): TObject;
æFi UObject
æT PROCEDURE
æC NewObjectByClassId creates a new object with the specified class identifier.
The classID parameter is the identifier that specifies the class of the new
object.
MacApp calls NewObjectByClassId from the global routine NewStdObject. You do not
need to call this routine yourself.
æKY NewObjectByClassName
æD FUNCTION NewObjectByClassName(className: MAName): TObject;
æFi UObject
æT PROCEDURE
æC NewObjectByClassName creates a new object with the specified class name.
The parameter className is the name that specifies the class of the new object.
MacApp calls NewObjectByClassName from TEvtHandler.CreateAView. You do not need
to call this routine yourself.The parameter className is the name that specifies
the class of the new object.
æKY NewPaletteWindow
æD FUNCTION NewPaletteWindow(itsRsrcID: INTEGER; wantHScrollBar,
wantVScrollBar: BOOLEAN; itsDocument: TDocument; itsMainView: TView;
itsPaletteView: TView; sizePalette: INTEGER; whichWay: VHSelect): TWindow;
æFi UMacApp
æT PROCEDURE
æC NewPaletteWindow creates a TWindow object with a subview that you can use as
a palette or a non-scrolling status area.
The parameter itsRsrcID is the resource ID of the 'WIND' resource that MacApp
will use to create the TWindow object. If the value of the wantHScrollBar parameter
is TRUE, then the resulting window will have a horizontal scroll bar, and if the
value of the wantVScrollBar parameter is TRUE, then it will have a vertical
scroll bar. If either parameter is TRUE, the window gets a scroller. The parameter
itsDocument is the TDocument object to be associated with the TWindow object.
The parameter itsMainView is the TView object to be the main display area of the
window. The parameter itsPaletteView is the TView object to be the window’s
palette or status area. The sizePalette parameter specifies the amount of space
that the palette or status area is to occupy; it is the distance, in pixels,
from the edge of the window to the inner edge of the palette or status area. The
whichWay parameter determines whether the palette is to be arranged vertically
or horizontally. If the value of whichWay is h, then the palette will appear on
the left side of the window, stretching from top to bottom. If the value of
whichWay is v, then the palette will appear at the top of the window, stretching
from left to right.
You can use NewPaletteWindow to create a window that incorporates a palette or
status region.
æKY NewPermHandle
æD FUNCTION NewPermHandle(logicalSize: Size): Handle;
æFi UMemory
æT PROCEDURE
æC NewPermHandle allocates and returns a handle to a permanently allocated block
of memory.
The logicalSize parameter specifies the newly allocated block’s logical size, in
bytes.
MacApp calls NewPermHandle from a variety of routines that allocate permanent
blocks of memory. You should use this routine instead of the Toolbox routine
NewHandle when you need to allocate permanent blocks of memory.
æKY NewPermPtr
æD FUNCTION NewPermPtr(logicalSize: Size): Ptr;
æFi UMemory
æT PROCEDURE
æC NewPermPtr allocates and returns a pointer to a permanently allocated block
of memory.
The logicalSize parameter specifies the newly allocated block’s logical size, in
bytes.
MacApp calls NewPermPtr from a variety of routines that allocate permanent blocks
of memory. You should use this routine instead of the Toolbox routine NewPtr
when you need to allocate permanent blocks of memory.
æKY NewSimpleWindow
æD FUNCTION NewSimpleWindow(itsRsrcID: INTEGER; wantHScrollBar,
wantVScrollBar: BOOLEAN; itsDocument: TDocument; itsView: TView): TWindow;
æFi UMacApp
æT PROCEDURE
æC NewSimpleWindow creates a TWindow object with a single main subview and returns
it.
The parameter itsRsrcID is the resource ID of the 'WIND' resource to be used to
create the window. If the value of the wantHScrollBar parameter is TRUE, then
the window will have a horizontal scroll bar; if the value of the wantVScrollBar
parameter is TRUE then it will have a vertical scroll bar. The parameter itsDocument
is the TDocument object to be associated with the TWindow object. The parameter
itsView is the TView object to be the window’s main display area.
MacApp calls NewSimpleWindow from TApplication.MakeClipboardWindow. You can use
this routine when you need to create a simple window.
æKY NewSortedList
æD FUNCTION NewSortedList: TSortedList;
æFi UList
æT PROCEDURE
æC NewSortedList creates a TSortedList object, initializes it, and returns it.
MacApp never calls this routine; it is provided for your convenience. You can
call it when you want to create a new TSortedList object.
æKY NewStdObject
æD FUNCTION NewStdObject(signature: IDType): TObject;
æFi UMacApp
æT PROCEDURE
æC NewStdObject creates a prototype instance of the specified class that MacApp
uses to create an object.
The signature parameter is the class identifier of the class to which the new
object belongs. For a list of constants that can be used to define standard
objects, see the definitions of object signatures in the file UMacApp.p.
MacApp uses NewStdObject to create certain TView objects. You usually do not
need to call this routine yourself.
æKY NewTemplateWindow
æD FUNCTION NewTemplateWindow(viewRsrcID: INTEGER; itsDocument: TDocument): TWindow;
æFi UMacApp
æT PROCEDURE
æC NewTemplateWindow creates a TWindow object using a view template and returns
the TWindow object.
The parameter viewRsrcId is the resource ID of the view template that MacApp
uses to create the window. The parameter itsDocument is the TDocument object to
be associated with the TWindow object.
MacApp calls NewTemplateWindow from several routines that create windows. You
can use this routine when you need to create a new window from a 'view' resource.
æKY NewTWindow
æD FUNCTION NewTWindow(itsRsrcID: INTEGER; itsDocument: TDocument): TWindow;
æFi UMacApp
æT PROCEDURE
æC NewTWindow creates and returns a TWindow object.
The parameter itsRsrcID is the resource ID of the view template that MacApp uses
to create the window. The parameter itsDocument is the TDocument object to be
associated with the TWindow object.
MacApp calls NewTWindow from the global routines NewPaletteWindow and NewSimpleWindow.
You do not need to call this routine yourself.
æKY NewViewRsrc
æD FUNCTION NewViewRsrc(VAR p: UNIV Ptr): ViewRsrcHndl;
æFi UMacApp
æT PROCEDURE
æC NewViewRsrc creates and returns a new initialized view template.
NewViewRsrc returns a pointer to the new template’s first entry in the p parameter.
You can use NewViewRsrc when you need to create a new view resource.
æKY NotYetImplemented
æD PROCEDURE NotYetImplemented(where: Str255);
æFi UMacApp
æT PROCEDURE
æC NotYetImplemented displays an alert message that warns the user that a feature
of the application is not yet implemented.
The where parameter is a string that gives more specific information about the
unimplemented feature in debugging versions of the application. NotYetImplemented
displays its message in the Debug Transcript followed by the string passed in
the where parameter.
You can use this routine to handle events that select unimplemented features of
your application.
æKY NullMenuProc
æD PROCEDURE NullMenuProc(message: INTEGER; aMenuHandle: MenuHandle;
VAR menuRect: Rect; hitPt: Point; VAR whichItem: INTEGER);
æFi UMenuSetup
æT PROCEDURE
æC NullMenuProc disables the Toolbox routine CalcMenuSize for the specified
menu.
MacApp ignores all the parameters of this routine except aMenuHandle. This
parameter is a handle to the menu for which CalcMenuSize is to be disabled.
MacApp disables CalcMenuSize during menu setup by assigning each menu’s menuProc
to be NullMenuProc. You do not need to call this routine yourself.
æKY NumberToHex
æD PROCEDURE NumberToHex(theNumber: UNIV LONGINT; VAR hexString: Str255;
hexDigits: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC NumberToHex converts the specified number to an equivalent string of hexadecimal
digits preceded by the dollar sign character.
The parameter theNumber is the number to be converted. NumberToHex stores the
resulting string in the hexString parameter. The hexDigits parameter specifies
the number of digits to appear in the hexadecimal string.
MacApp calls NumberToHex from the global routine StdFieldToString. You can use
this routine when you need to convert decimal numbers to hexadecimal strings.
æKY NumBlocks
æD FUNCTION NumBlocks(numBytes: LONGINT; blkSize: LONGINT): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC NumBlocks returns the number of blocks of a specified size required to store
the specified number of bytes.
The numBytes parameter is the number of bytes to be stored. The blkSize parameter
is the size of each block.
MacApp calls NumBlocks from TDocument.Save. You usually do not need to call this
routine yourself.
æKY NumToolboxTraps
æD FUNCTION NumToolboxTraps: INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC NumToolboxTraps returns the size of the trap table.
MacApp calls this routine when checking for the existence or validity of certain
traps. You can call NumToolboxTraps to check the size of the trap table.
æKY OBJFail
æD PROCEDURE OBJFail(error: INTEGER);
æFi UObject
æT PROCEDURE
æC OBJFail terminates execution of the application and displays an error message
indicating the cause of failure.
The error parameter is the error number that corresponds to the failure condition.
MacApp calls OBJFail when basic object operations such as method calls or object
type casts fail. You do not need to call this routine yourself.
æKY OffsetPtr
æD PROCEDURE OffsetPtr(VAR p: UNIV LONGINT; offset: LONGINT);
æFi UMacApp
æT PROCEDURE
æC OffsetPtr adds the specified offset to the given pointer, ensuring that the
resulting pointer is properly word-aligned.
The p parameter is the pointer that is to be offset when the routine is called;
when it returns, p is the resulting pointer. The offset parameter is the number
of bytes to add to the pointer’s value to obtain the new pointer.
MacApp calls OffsetPtr from a variety of methods that manipulate memory or perform
low-level data access with Pascal records. You can use this routine in a similar
fashion.
æKY OffsetPtrWStr
æD PROCEDURE OffsetPtrWStr(VAR p: UNIV LONGINT; offset: LONGINT);
æFi UMacApp
æT PROCEDURE
æC OffsetPtrWStr assumes that the p parameter points to a data structure that
has a Str255 at the end. The routine offsets the pointer by the amount necessary
to take into account the length byte and the contents of the string. Thus, it
only adds the relevant amount to the pointer, ensuring that the resulting pointer
is properly word-aligned.
The p parameter is the pointer that is to be offset when the routine is called;
when it returns, p is the resulting pointer. The offset parameter is the size of
the data structure including the full size of the Str255 that is to be added to
the pointer’s value to obtain the new pointer.
MacApp calls OffsetPtrWStr from a variety of methods that need access to data
that is stored with only the relevant portions of the final Str255 in the data
structure. You can use this routine in a similar fashion.
æKY OffsetVRect
æD PROCEDURE OffsetVRect(VAR r: VRect; dh, dv: VCoordinate);
æFi UViewCoords
æT PROCEDURE
æC OffsetVRect changes the location of a view rectangle by the specified horizontal
and vertical distances and stores the resulting rectangle in the passed parameter.
The r parameter is the rectangle to be moved when the routine is called; it is
the resulting rectangle when the routine returns. The dh parameter is the distance
that the rectangle is to be moved horizontally, and dv is the distance that it
is to be moved vertically.
MacApp calls this routine from several view methods that change the location of
the view rectangle. You can use this routine in a similar fashion.
æKY OptionKeyIsDown
æD FUNCTION OptionKeyIsDown: BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC OptionKeyIsDown reads the current state of the keyboard and returns the value
TRUE if the Option key is pressed while this method is called.
MacApp calls this method from the TApplication methods HandleFinderRequest and
OpenDeskAccessory to determine whether the user is pressing the option key while
opening documents or desk accessories, respectively. You can use this method in
a similar fashion.
æKY OrderClassIdsByName
æD PROCEDURE OrderClassIdsByName;
æFi UObject
æT PROCEDURE
æC OrderClassIdsByName sorts the global list of class identifiers alphabetically
by class name.
MacApp calls OrderClassIdsByName from the global routine InitUObject. You do not
need to call this routine yourself.
æKY ParseTitleTemplate
æD FUNCTION ParseTitleTemplate(VAR itsTemplate: Str255;
VAR preDocname, constTitle: INTEGER): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC ParseTitleTemplate uses the passed template string to generate titles for
document windows.
The itsTemplate parameter is the string that is used as a template for document
names. The preDocname parameter is the starting position of the document name in
the template string. The constTitle parameter is the number of characters in the
title template that do not change from document to document.
MacApp calls ParseTitleTemplate from TWindow.IWindow to parse templates for
window titles. You do not need to call this routine yourself.
æKY PatchTrap
æD FUNCTION PatchTrap(VAR thePatch: TrapPatch; theTrapNum: INTEGER;
theRoutine: Ptr): INTEGER;
æFi UPatch
æT PROCEDURE
æC PatchTrap installs a patch to the specified trap, returns an error code, and
returns a completed TrapPatch record that corresponds to the patch (the TrapPatch
record is defined in UPatch.p).
PatchTrap stores a TrapPatch record that corresponds to the patch specified in
the parameter thePatch. The parameter theTrapNum is the number of the A-line
trap that will be patched. The parameter theRoutine is a pointer to the routine
that patches the trap.
MacApp calls PatchTrap from several global routines that set up the MacApp run-time
environment. You can use this routine to install your own traps. Be careful,
though, to follow the guidelines in Macintosh® Technical Note #25, “Don’t Depend
on Register A5 Within Trap Patches”; patching traps can be dangerous if you do
not follow these guidelines.
æKY PerfCmd
æD PROCEDURE PerfCmd;
æFi UDebug
æT PROCEDURE
æC PerfCmd handles keystrokes for the MacApp debugger's performance-measurement
tools.
MacApp calls PerfCmd from the MacApp debugger when the user invokes
performance-monitoring tools for an application compiled with the qPerform flag set
to TRUE. You usually do not need to call PerfCmd yourself.
æKY PerformMenuSetup
æD PROCEDURE PerformMenuSetup(PROCEDURE TheMenuSetterUpper);
æFi UMenuSetup
æT PROCEDURE
æC PerformMenuSetup creates and initializes all the menus used by the application
when it is launched.
The parameter TheMenuSetterUpper is a procedure declared separately that performs
the actual operations needed to set up the application menus.
MacApp calls PerformMenuSetup from TApplication.SetupTheMenus. You do not need
to call this routine yourself.
æKY PermAllocation
æD FUNCTION PermAllocation(permanent: BOOLEAN): BOOLEAN;
æFi UMemory
æT PROCEDURE
æC PermAllocation specifies whether subsequent memory allocations are considered
permanent or temporary. It returns the previous state of the permanent allocation
flag.
Set the permanent parameter to TRUE to specify permanent allocation; pass FALSE
for temporary allocation.
MacApp calls PermAllocation from a variety of routines that create or manipulate
permanent blocks of memory. You usually do not need to call this routine yourself.
You can allocate temporary memory using the Toolbox routines NewPtr and NewHandle,
and you can allocate permanent memory using the MacApp global routines NewPermPtr
and NewPermHandle.
æKY PinOnRect
æD FUNCTION PinOnRect(theRect: Rect; thePt: Point): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC PinOnRect “pins,” or constrains, a point inside the specified rectangle,
changing its coordinates if necessary, and returns the point.
The parameter theRect is the rectangle that defines the area that the point may
occupy. The parameter thePt specifies the point that is to be pinned.
You can use PinOnRect to adjust the positions of points so that they lie within
a constraining rectangle.
æKY PinVRect
æD PROCEDURE PinVRect(r: VRect; VAR pt: VPoint);
æFi UViewCoords
æT PROCEDURE
æC PinVRect “pins,” or constrains, a view point within the specified view rectangle.
The r parameter is the rectangle that is to contain the pinned point. The pt
parameter is the point to be pinned when the routine is called; it is the pinned
point when the routine returns.
MacApp uses PinVRect from several TrackMouse methods to constrain a point within
a view rectangle. You can use this routine in a similar fashion.
æKY PointerToHex
æD PROCEDURE PointerToHex(theNumber: UNIV LONGINT; VAR hexString: Str255;
hexDigits: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC PointerToHex converts a pointer to a string of hexadecimal digits.
The parameter theNumber is the number to be converted. If theNumber is zero,
then the hexString parameter is set to 'Nil'; otherwise theNumber is converted
to a hex string preceeded with '$' and stored in hexString when the routine
returns. The hexDigits parameter specifies the number of digits that are to
appear in the hexadecimal string.
MacApp calls PointerToHex from several routines that display pointer values; for
example, the TObjectView class uses PointerToHex to display the addresses of
objects. You can use this routine in a similar fashion.
æKY PositionDebugWindow
æD PROCEDURE PositionDebugWindow(where: CHAR);
æFi UDebug
æT PROCEDURE
æC PositionDebugWindow brings the Debug Transcript to the front, or sends it
behind all other windows, as specified.
The where parameter specifies which action the routine is to take. If the value
of the where parameter is F, then PositionDebugWindow brings the Debug Transcript
to the front. If the value of the where parameter is B, then PositionDebugWindow
sends the Debug Transcript behind all other windows.
MacApp calls PositionDebugWindow from the MacApp debugger’s command-handling
code. You do not need to call this routine yourself.
æKY PostLoadMacAppSegment
æD PROCEDURE PostLoadMacAppSegment;
æFi UMemory
æT PROCEDURE
æC PostLoadMacAppSegment restores the current resource file.
MacApp calls PostLoadMacAppSegment at the end of the LoadSeg patch. You do not
need to call this routine yourself.
æKY PreloadSegment
æD FUNCTION PreloadSegment(segnum: INTEGER): BOOLEAN;
æFi UMemory
æT PROCEDURE
æC PreloadSegment attempts to load a code segment into the top of the heap and
lock it. The routine returns TRUE if it successfully loads the segment.The segnum
parameter specifies which code segment is to be loaded.
MacApp calls PreloadSegment from the global routines LoadMacAppSegment and
SetResidentSegment. You can use PreloadSegment if you need to load a code segment
or if you need to determine whether a segment can be loaded before calling its routines.
æKY PreloadSegmentResource
æD FUNCTION PreloadSegmentResource(segNum: INTEGER): BOOLEAN;
æFi UMemory
æT PROCEDURE
æC PreloadSegmentResource attempts to load an application’s code segment into
the top of the heap and lock it. The routine returns TRUE if it successfully
loads the segment.
The segNum parameter specifies the code segment to be loaded.
MacApp calls PreloadSegmentResource from the global routine LoadMacAppSegment.
You usually do not need to call this routine yourself.
æKY ProgramBreak
æD PROCEDURE ProgramBreak(grievance: Str255);
æFi UFailure
æT PROCEDURE
æC ProgramBreak causes a program to break, passes control to the Debug Transcript’s
command handler, and displays a break message.
The grievance parameter is the message to be displayed in the Debug Transcript.
MacApp calls ProgramBreak from numerous routines when certain types of operations
fail. You can use this routine for debugging; you call it when critical conditions
for which you are testing are not satisfied.
æKY ProgramReport
æD PROCEDURE ProgramReport(grievance: Str255; break: BOOLEAN);
æFi UFailure
æT PROCEDURE
æC ProgramReport displays a message in the Debug Transcript.
The grievance parameter is the message to be displayed in the Debug Transcript.
If the value of the break parameter is TRUE, then ProgramReport causes a program
break.
MacApp calls ProgramReport from the global routines CheckRsrcUsage and UnloadAllSegments.
You can use this routine for debugging and profiling in your application, and
you can call it to display information about your application’s behavior and
performance in the Debug Transcript.
æKY PRStr
æD FUNCTION PRStr(astr: Str255): Ptr;
æFi UMacAppUtilities
æT PROCEDURE
æC PRStr returns the address of a string. This is useful for getting a string in
a packed record.
The astr parameter is a pointer to the field of a packed record that contains the
string of interest.
MacApp uses PRStr to get the addresses of strings it is copying that are stored
in packed records. You can use this routine in a similar fashion.
æKY Pt2VRect
æD PROCEDURE Pt2VRect(topLeft, botRight: VPoint; VAR dstRect: VRect);
æFi UViewCoords
æT PROCEDURE
æC Pt2VRect changes a view rectangle so that its top-left point and its bottom-right
point correspond with the specified view points.
The topLeft parameter specifies the view rectangle’s new top-left point; the
bottomRight parameter specifies its new bottom-right point. The dstRect parameter
is the view rectangle to be modified when the routine is called and is the modified
view rectangle when the routine returns.
You can call this routine to create a view rectangle using two view points.
æKY PtInVRect
æD FUNCTION PtInVRect(pt: VPoint; r: VRect): BOOLEAN;
æFi UViewCoords
æT PROCEDURE
æC PtInVRect returns TRUE if the specified view point is in the specified rectangle.
The pt parameter is the point to be tested, and the r parameter is the rectangle
to be tested.
MacApp uses PtInVRect when testing the position of the mouse against displayed
views. You can use this routine in a similar fashion.
æKY PtIsVisible
æD FUNCTION PtIsVisible(pt: Point): BOOLEAN;
æFi UMacApp.Globals
æT PROCEDURE
æC PtIsVisible returns TRUE if the value of gDrawingPictScrap is TRUE or the
specified point is within both thePort’s visible region and thePort’s clip region.
The pt parameter is the point to be tested.
MacApp does not call this routine; it is provided for your convenience. You can
use it to determine whether a point is visible or if the PICT scrap is currently
being drawn.
æKY PtToVPt
æD PROCEDURE PtToVPt(thePt: Point; VAR theVPt: VPoint);
æFi UViewCoords
æT PROCEDURE
æC PtToVPt changes a view point so that it has the same coordinates as the specified
QuickDraw point.
The parameter thePt is the QuickDraw point whose coordinates are to be copied.
The parameter theVPt is the view point to be modified when the routine is called
and is the modified point when PtToVPt returns.
MacApp frequently calls PtToVPt to convert the position of the mouse into view
coordinates so that the position can be tested. You can use this routine in a
similar fashion.
æKY PullApplicationToFront
æD PROCEDURE PullApplicationToFront;
æFi UMacAppUtilities
æT PROCEDURE
æC PullApplicationToFront forces MultiFinder™ to make the application active.
(Applications don’t start as the frontmost layer under MultiFinder. Instead,
they come to the front after a few events are processed.)
PullApplicationToFront is a utility for use with applications that have decorative
startup screens. If your application displays such a screen when it starts up,
then you can use this routine to ensure that it becomes visible.
æKY PushLong
æD FUNCTION PushLong(h, v: integer): LONGINT;
æFi UMacApp.TWindow
æT PROCEDURE
æC PushLong converts the specified point into a LongInt value.
The h parameter is the point's horizontal coordinate. The v parameter is the
point's vertical coordinate.
PushLong is called by TWindow.IsDraggable when determining if the corner of a
specified rectangle can be dragged by the user. This routine is intended for
MacApp’s internal use; you never need to call it yourself.
æKY PutDeskScrapData
æD FUNCTION PutDeskScrapData(aResType: ResType; aDataHandle: Handle): OSerr;
æFi UMacApp
æT PROCEDURE
æC PutDeskScrapData writes data to the desk scrap. If the routine fails to write
the data, then it returns an error code. Otherwise, it returns noErr.
The parameter aResType is the resource type identifier that corresponds to the
data to be written to the desk scrap. The parameter aDataHandle is a handle to
the data itself.
MacApp calls PutDeskScrapData from methods that write the contents of views to
the desk scrap. You can use this routine in a similar fashion.
æKY ReadInteger
æD FUNCTION ReadInteger(prompt: Str255): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC ReadInteger displays a message in the Debug Transcript and then waits for you
to enter a number. The routine returns the number that you enter.
The prompt parameter is the message to be displayed.
MacApp uses ReadInteger in debugging versions of applications when certain failures
occur. It then returns the entered number as the error code for the failure. You
can use this routine in a similar fashion.
æKY ReadYesNo
æD FUNCTION ReadYesNo(prompt: Str255): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC ReadYesNo displays a message in the Debug Transcript and waits for the user
to enter a “yes” or “no” response. If the response is either of the characters
“Y” or “y”, then the routine returns TRUE. If it is any other character, then
the routine returns FALSE.
The prompt parameter is the message to be displayed.
MacApp calls ReadYesNo from a variety of failure handlers in debugging versions
of applications. Your response generally determines how the debugging code handles
the failure condition. You can use this routine in a similar fashion.
æKY RectIsVisible
æD FUNCTION RectIsVisible(r: Rect): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC RectIsVisible determines whether a rectangle is in the visible region and the
clip region of the current grafPort; if the rectangle is visible, then the routine
returns TRUE.
The r parameter is the rectangle to be tested.
MacApp calls RectIsVisible from TListView.DoHighlightSelection. You can use this
routine to determine whether a particular rectangle is visible.
æKY RectsNest
æD FUNCTION RectsNest(outer, inner: Rect): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC RectsNest determines whether one rectangle is entirely contained within another.
RectsNest returns TRUE if the rectangle passed in the inner parameter is entirely
contained within the rectangle passed in the outer parameter.
MacApp calls RectsNest from TTEView.ScrollSelectionIntoView. You can use this
routine when you must determine whether a rectangle is contained by another.
æKY RectToVRect
æD PROCEDURE RectToVRect(theRect: Rect; VAR theVRect: VRect);
æFi UViewCoords
æT PROCEDURE
æC RectToVRect modifies a view rectangle so that it has the same top-left point
and bottom-right point as the specified QuickDraw rectangle.
The parameter theRect is the QuickDraw rectangle to be copied. The parameter
theVRect is the view rectangle to be modified when the routine is called, and it
is the modified view rectangle when the routine returns.
MacApp calls RectToVRect from a variety of view-handling routines to convert
from QuickDraw rectangles to view rectangles. You can use this routine in a
similar fashion.
æKY RegisterStdType
æD PROCEDURE RegisterStdType(typeName: Str255; signature: IDType);
æFi UMacApp
æT PROCEDURE
æC RegisterStdType associates a class with the specified class identifier.
The typeName parameter is a string that names the class to be registered. The
signature parameter is the identifier with which the class is to be associated.
MacApp calls RegisterStdType from several initialization routines to register
the standard MacApp classes. You must use this routine during the application’s
initialization to register your own view classes.
æKY RemHandle
æD PROCEDURE RemHandle(h: Handle; toList: HandleListHandle);
æFi UMemory
æT PROCEDURE
æC RemHandle removes a handle from a handle list.
The h parameter is the handle to be removed. The toList parameter is the list
from which it is to be removed.
You can use this routine to help manage lists of handles.
æKY RemoveAnyNMRequests
æD PROCEDURE RemoveAnyNMRequests;
æFi UDebug
æT PROCEDURE
æC RemoveAnyNMRequests clears the notification queue and releases the handle to
the small icon resource used to notify the user that there is an alert from
another application.
RemoveAnyNMRequests is called by TDebugApplication.HandleSystemEvent after activating
the application layer that generated the Notification Manager request. This
routine is intended for internal use by MacApp. You never need to call it yourself.You
can use this routine to help manage lists of handles.
æKY RemoveObjectFromInspector
æD PROCEDURE RemoveObjectFromInspector(theObject: TObject);
æFi UInspector
æT PROCEDURE
æC RemoveObjectFromInspector removes references to an object from any open Inspector
windows.
The parameter theObject is the object that is to be removed from the Inspector
windows.
MacApp calls RemoveObjectFromInspector when an object is freed. You do not need
to call this routine yourself.
æKY ResetBusyCursor
æD PROCEDURE ResetBusyCursor;
æFi UBusyCursor
æT PROCEDURE
æC ResetBusyCursor is a patch routine that resets the delay time of the busy
cursor and restores the original cursor if the busy cursor is displayed.
You usually do not need to call ResetBusyCursor yourself, but you can call it if
you want to restore the cursor and reset the time before changing the image to a
watch.
æKY RoundUp
æD FUNCTION RoundUp(aNumber: LONGINT; aModulus: INTEGER): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC RoundUp changes the value of a numeric parameter so that it is evenly divisible
by the specified modulus. RoundUp always changes the number to the next greater
number that is evenly divisible.
The aNumber parameter is the number to be changed. The aModulus parameter is the
number that must divide evenly into the new value.
MacApp calls RoundUp from TView.ComputeSize. You can use this routine when you
need to round a number upward so that it is evenly divisible by another number.
æKY SaveEventQueue
æD PROCEDURE SaveEventQueue(save: BOOLEAN);
æFi UDebug
æT PROCEDURE
æC SaveEventQueue saves the current event queue or restores the previous event
queue.
If the value of the save parameter is TRUE, then SaveEventQueue stores the current
event queue in the global variable pQHdr. Otherwise, SaveEventQueue makes the
queue stored in pQHdr the current event queue.
MacApp uses SaveEventQueue to change event queues in certain code that hides
events from MacApp routines. You usually do not need to call this routine yourself.
æKY ScanHandles
æD PROCEDURE ScanHandles(PROCEDURE DoToHandle(h: Handle));
æFi UMemory
æT PROCEDURE
æC ScanHandles calls a procedure once for each handle in the global lists of
handles.
DoToHandle is a procedure that you declare separately. Its argument, h, is bound
to each handle in turn, and the procedure is called with that argument.
MacApp calls ScanHandles from the global routine TotalTempSize to determine how
much memory is allocated for all handles to temporary memory. You usually do not
need to call this routine yourself, but you can use it to iterate over the global
lists of handles.
æKY ScrapStuffFields
æD PROCEDURE ScrapStuffFields(aTitle: Str255; VAR aScrapStuff: ScrapStuff;
PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; fieldType: INTEGER));
æFi UMacAppUtilities
æT PROCEDURE
æC ScrapStuffFields reports the contents of the fields of a ScrapStuff record to
the MacApp Inspector.
The aTitle parameter is the title that is displayed in the Inspector window and
identifies the field being displayed. The aScrapStuff parameter is a record of
type ScrapStuff. DoToField is a procedure that MacApp passes to ScrapStuffFields
to report the contents of each field. ScrapStuffFields performs DoToField on
each of the ScrapStuff record's fields; in this way, Fields reports the contents
of each field to the Inspector.
MacApp calls ScrapStuffFields from the MacApp Inspector. You never call this
routine yourself.
æKY SectVRect
æD FUNCTION SectVRect(src1, src2: VRect; VAR dstRect: VRect): BOOLEAN;
æFi UViewCoords
æT PROCEDURE
æC SectVRect computes the rectangle that defines the intersection of the two
specified rectangles and stores the result in the specified variable.
The src1 and src2 parameters are the rectangles whose intersection is to be
determined. The dstRect parameter contains the resulting rectangle when the
routine returns. If the two rectangles do not intersect then the dstRect parameter
contains an empty rectangle and the routine returns FALSE.
You can use this routine to find the intersection of two rectangles.
æKY SetBreakCmd
æD PROCEDURE SetBreakCmd;
æFi UDebug
æT PROCEDURE
æC SetBreakCmd displays a prompt in the Debug Transcript and waits for you to
type the name of a routine. It then sets a breakpoint at the named routine.
MacApp uses SetBreakCmd to set breakpoints in debugging versions of applications.
You do not need to call SetBreakCmd yourself.
æKY SetCallBack
æD PROCEDURE SetCallBack(targProc: ProcPtr; itsRefCon: Longint;
theCallBackPtr: CallBackPtr);
æFi UPatch
æT PROCEDURE
æC SetCallBack initializes a callback for use with certain Toolbox routines.
The targProc parameter is the procedure that is your callback routine’s target.
When the callback routine gains control, it calls the target procedure, passing
the reference constant itsRefCon. The itsRefCon parameter is a reference constant
that the target procedure uses to reference your data. The parameter theCallBackPtr
is the pointer to your callback routine; the Toolbox routine uses it to call
your callback routine.
You can use SetCallBack to pass the Toolbox a pointer to your callback routine.
æKY SetCMacAppCursor
æD PROCEDURE SetCMacAppCursor(theCCursor: CCrsrHandle);
æFi UBusyCursor
æT PROCEDURE
æC SetCMacAppCursor is a patch to the Toolbox routine SetCCursor. It saves a
copy of the specified color cursor and sets a field of the pCursorInfo record to
indicate that the current cursor is a color cursor.
The parameter theCCursor is the color cursor that becomes the new current cursor.
MacApp installs SetCMacAppCursor in the initialization code for the UBusyCursor
unit. You do not need to call this routine yourself.
æKY SetCmdIcon
æD PROCEDURE SetCmdIcon(aCmd: CmdNumber; menuIcon: Byte);
æFi UMenuSetup
æT PROCEDURE
æC SetCmdIcon adds an icon to the specified menu item and informs MacApp that
the menu’s size must be recomputed.
The parameter aCmd is the command number that corresponds to the menu item to
which the icon is to be added. The menuIcon parameter is the identifier of the
icon to be added.
You can use SetCmdIcon when you want to add an icon to a menu item.
æKY SetCmdName
æD PROCEDURE SetCmdName(aCmd: CmdNumber; menuText: Str255);
æFi UMenuSetup
æT PROCEDURE
æC SetCmdName changes the name of the specified menu item and informs MacApp
that the menu’s size must be recomputed.
The parameter aCmd is the command number that corresponds to the menu item whose
name is to be changed. The menuText parameter is the new text of the item.
You can use SetCmdName when you want change the name of a menu item.
æKY SetFocus
æD PROCEDURE SetFocus(theFocusRec: FocusRec);
æFi UMacApp
æT PROCEDURE
æC SetFocus sets the current focus using a FocusRec record.
The parameter theFocusRec is the focus record that MacApp will use to reset the
current focus.
MacApp calls SetFocus from a variety of routines that manipulate grafPorts. You
can use this routine when you need to ensure that the current focus is set a
particular way. You can use the global routine GetFocus to save the current
focus state in a variable.
æKY SetGetProc
æD FUNCTION SetGetProc(theGetProc: ProcPtr): ProcPtr;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY SetHandleBits
æD PROCEDURE SetHandleBits(h: Handle; theBits: SignedByte);
æFi UMacAppUtilities
æT PROCEDURE
æC SetHandleBits sets the flag byte of a handle.
The h parameter is the handle whose flags are to be set. The parameter theBits
is the flag byte whose value becomes the new flag byte of the handle.
MacApp calls SetHandleBits from a few methods that manipulate handles. You can
use this routine if you want to safely manipulate the flag bits of a handle.
Avoid manipulating flag bits directly, because that may affect the application’s
compatibility with future systems.
æKY SetHLPenState
æD PROCEDURE SetHLPenState(fromHL, toHL: HLState);
æFi UMacApp
æT PROCEDURE
æC SetHLPenState allows you to control the highlighting state of the QuickDraw
pen.
The fromHL parameter is the highlighting state before the routine is called,
and the toHL parameter is the state after the routine returns. Legal values for
these parameters include:
hlOff = 1 (unhighlighted)
hlDim = 2 (dimly highlighted)
hlOn = 4 (highlighted)
hlOffDim = hlOff + hlDim
hlDimOff = hlOffDim
hlDimOn = hlDim + hlOn
hlOnDim = hlDimOn
hlOffOn = hlOff + hlOn
hlOnOff = hlOffOn
MacApp calls SetHLPenState from several drawing and highlighting methods. You
can use this routine to control the state of the QuickDraw highlighting pen.
æKY SetIfBkColor
æD PROCEDURE SetIfBkColor(aColor: RGBColor);
æFi UMacAppUtilities
æT PROCEDURE
æC SetIfBkColor sets the background color for drawing to the available color
closest to the specified color.
The parameter aColor is the color that becomes the new background color.
MacApp calls SetIfBkColor from several TPopup methods to set a background color
for drawing the TPopup object. You can use this routine in a similar fashion.
æKY SetIfColor
æD PROCEDURE SetIfColor(aColor: RGBColor);
æFi UMacAppUtilities
æT PROCEDURE
æC SetIfColor sets the foreground color for drawing to the available color closest
to the specified color.
The parameter aColor is the color that becomes the new foreground color.
MacApp calls SetIfColor from a variety of drawing methods to control the color
of the QuickDraw pen. You can use this routine in a similar fashion.
æKY SetIndCmdName
æD PROCEDURE SetIndCmdName(aCmd: CmdNumber; rsrcID, strIndex: INTEGER);
æFi UMenuSetup
æT PROCEDURE
æC SetIndCmdName sets the name of a menu item to a string that it retrieves from
the specified string list.
The parameter aCmd is the command number corresponding to the menu item that
will be changed. The rsrcID parameter is the resource identifier of a 'STR#'
resource that contains the desired string. The strIndex parameter is the position
of the desired string in the string list.
MacApp calls SetIndCmdName from the global routine SetMenuState to set the names
of menu items using the MacApp buzz-string resource. You can use this routine to
manage the names of menu items using your own string-list resource.
æKY SetKeyScript
æD FUNCTION SetKeyScript(newKeyScript: INTEGER): INTEGER;
æFi UMacAppUtilities
æT PROCEDURE
æC SetKeyScript sets the current script to the specified script. Typing on the
keyboard subsequently produces characters in the new script. The routine returns
the previously installed script.
The newKeyScript parameter is the identifier of the keyScript record that becomes
the new keyscript. See the Script Manager chapter of Inside Macintosh, Volume V,
for a discussion of key scripts.
MacApp calls SetKeyScript when the Script Manager is installed and the font
changes. You do not need to call this routine yourself.
æKY SetMacAppCursor
æD PROCEDURE SetMacAppCursor(VAR theCursor: Cursor);
æFi UBusyCursor
æT PROCEDURE
æC SetMacAppCursor is a patch to the Toolbox routine SetCursor. The routine
stores a reference to the new cursor before calling SetCursor to set the current
cursor image.
The parameter theCursor is the new cursor record.
MacApp calls SetMacAppCursor from the patch to InitCursor to set the cursor
image to the arrow. You can use this routine in a similar fashion.
æKY SetMenuState
æD PROCEDURE SetMenuState(aCmd: CmdNumber; rsrcID, falseBuzzItem,
trueBuzzItem: INTEGER; stateVariable: BOOLEAN);
æFi UMenuSetup
æT PROCEDURE
æC SetMenuState sets a menu item to the specified state.
The parameter aCmd is the command number that corresponds to the menu item that
will be changed. The rsrcID parameter is the resource identifier for the affected
menu. The trueBuzzItem parameter and the falseBuzzItem parameter are the position
of the desired string in the string list for the menu item’s text in the enabled
(TRUE) and disabled (FALSE) states. The stateVariable parameter specifies whether
the item will be set to TRUE or FALSE.
MacApp calls SetMenuState from TApplication.SetupTheMenus and from
TApplication.DoSetupMenus. You usually do not need to call this routine yourself.
æKY SetPermHandleSize
æD PROCEDURE SetPermHandleSize(h: Handle; newSize: Size);
æFi UMemory
æT PROCEDURE
æC SetPermHandleSize sets the size of a block of memory to the specified size.
The h parameter is a handle to the block of memory to be affected. The newSize
parameter is the new size, in bytes, of the block of memory.
MacApp calls SetPermHandleSize from certain low-level routines that manipulate
blocks of memory and control their sizes directly. You usually do not need to
call this routine yourself.
æKY SetPermPtrSize
æD PROCEDURE SetPermPtrSize(p: Ptr; newSize: Size);
æFi UMemory
æT PROCEDURE
æC SetPermPtrSize sets the size of a block of memory to the specified size.
The p parameter is a pointer to the block of memory to be affected. The newSize
parameter is the new size, in bytes, of the block of memory.
MacApp calls SetPermPtrSize from certain low-level routines that manipulate
blocks of memory and control their sizes directly. You usually do not need to
call this routine yourself.
æKY SetPortTextStyle
æD PROCEDURE SetPortTextStyle(theTextStyle: TextStyle);
æFi UMacAppUtilities
æT PROCEDURE
æC SetPortTextStyle sets the font style of the current grafPort to the specified
style.
The parameter theTextStyle is a TextStyle record that specifies the new style.
See the QuickDraw chapter of Inside Macintosh, Volume I, for a discussion of
text styles.
MacApp calls SetPortTextStyle from a variety of routines that draw text in views.
You can use this routine to set the current text style in your own text-drawing
methods.
æKY SetPutProc
æD FUNCTION SetPutProc(thePutProc: ProcPtr): ProcPtr;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY SetReserveSize
æD PROCEDURE SetReserveSize(forCode, forOther: Size);
æFi UMemory
æT PROCEDURE
æC SetReserveSize sets the size of the memory reserves, in bytes, to the specified
sizes.
The forCode parameter is the new size, in bytes, of the code reserve. The forOther
parameter is the new size, in bytes, of the low-memory reserve.
MacApp calls SetReserveSize from a few low-level routines that manipulate the
memory reserves. You usually do not need to call SetReserveSize yourself.
æKY SetResidentSegment
æD PROCEDURE SetResidentSegment(segnum: INTEGER; makeResident: BOOLEAN);
æFi UMemory
æT PROCEDURE
æC SetResidentSegment specifies whether a code segment is to be a resident segment.
The segnum parameter is the segment number of the segment to be affected. If the
value of the makeResident parameter is TRUE, then the code segment becomes resident;
otherwise, it becomes non-resident.
MacApp calls SetResidentSegment from initialization routines when the application
starts up. You usually do not need to call this routine yourself.
æKY SetRGBColor
æD PROCEDURE SetRGBColor(VAR RGB: RGBColor; red, green, blue: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC SetRGBColor changes the fields of an RGBColor record to have the specified
red, green, and blue values. SetRGBColor stores the red, green, and blue values
into the appropriate fields of the RGB parameter when the routine returns.
The red parameter is the record’s new red value, and the blue and green parameters
are the corresponding blue and green values.
MacApp calls SetRGBColor from the global routine DoRealInitToolBox. You can use
this routine when you need to set the value of a color represented by an RGBColor
record.
æKY SetSelect
æD PROCEDURE SetSelect(theStart, theEnd: INTEGER; hTE: TEHandle);
æFi UTEView
æT PROCEDURE
æC SetSelect sets the current text selection for the given Text Edit handle
without highlighting it.
The parameter theStart is the position in the text buffer of the first character
in the new selection; the parameter theEnd is the position of the last character
in the new selection. The hTE parameter is a handle to the TextEdit record that
contains the text.
MacApp calls SetSelect from a variety of routines that manipulate and change
text in TextEdit records. You can use this routine whenever you need to change
the current text selection without highlighting it.
æKY SetStackSpace
æD PROCEDURE SetStackSpace(numBytes: LONGINT);
æFi UMemory
æT PROCEDURE
æC SetStackSpace sets the size of the application’s stack.
The numBytes parameter is the new size, in bytes, of the application stack.
MacApp calls SetStackSpace from the global routine DoInitUMemory when the application
starts up. You do not need to call this routine yourself.
æKY SetStyle
æD PROCEDURE SetStyle(aCmd: CmdNumber; aStyle: Style);
æFi UMenuSetup
æT PROCEDURE
æC SetStyle sets the text style of the menu item corresponding to the specified
command number and instructs the Menu Manager to recalculate the size of the
menu.
The parameter aCmd is the command number associated with the item to be changed.
The parameter aStyle is the new style of the menu item. Styles can include the
values bold, italic, underline, outline, shadow, condense, and extend.
MacApp calls SetStyle from a few TListView methods that change the style of menu
items. You can use this routine to control the appearance of menu items.
æKY SetTextStyle
æD PROCEDURE SetTextStyle(VAR theTextStyle: TextStyle; theFont: INTEGER;
theStyle: Style; theSize: INTEGER; theColor: RGBColor);
æFi UMacAppUtilities
æT PROCEDURE
æC SetTextStyle sets the value of a TextStyle record. For a discussion of TextStyle
records, see Inside Macintosh, Volume V, page 265.
The parameter theTextStyle is the TextStyle record whose value is set. The parameter
theFont becomes the font of the TextStyle record. The parameter theStyle becomes
the record’s style; this parameter can have any combination of bold, italic,
underline, outline, shadow, condense, and extended. The parameter theSize becomes
the size of the record’s font. The parameter theColor becomes the color used to
draw text associated with the TextStyle record.
MacApp calls SetTextStyle from several routines that draw text or initialize
text-related classes. You can use this routine when you need to initialize a
TextStyle record.
æKY SetVPt
æD PROCEDURE SetVPt(VAR vPt: VPoint; h, v: VCoordinate);
æFi UViewCoords
æT PROCEDURE
æC SetVPt sets the horizontal and vertical coordinates of a view point to the
specified values.
The vPt parameter is the view point to be modified when the routine is called.
It is the modified view point when the routine returns. The h parameter is the
new horizontal coordinate, and the v parameter is the new vertical coordinate.
MacApp calls SetVPt from a variety of routines that specify a view point to
adjust the sizes or positions of views. You can use this routine in a similar
fashion.
æKY SetVRect
æD PROCEDURE SetVRect(VAR r: VRect; left, top, right, bottom: VCoordinate);
æFi UViewCoords
æT PROCEDURE
æC SetVRect sets the corner coordinates of a view rectangle to the specified
values.
The r parameter is the view rectangle to be modified when the routine is called.
It is the modified rectangle when the routine returns. The left parameter is the
new left coordinate, the top parameter is the new top coordinate, the right
parameter is the new right coordinate, and the bottom parameter is the new bottom
coordinate.
MacApp calls SetVRect from a variety of routines that manipulate rectangular
areas in views. You can use this routine in a similar fashion.
æKY ShowDisasmMemory
æD PROCEDURE ShowDisasmMemory(startAddress, numBytes: Longint);
æFi UDebug
æT PROCEDURE
æC ShowDisasmMemory disassembles an area of memory and displays the generated
assembly source code in the Debug Transcript.
The startAddress parameter is the address where disassembly is to start. The
numBytes parameter is the number of bytes of memory to be disassembled.
MacApp calls ShowDisasmMemory from the MacApp debugger’s command interpreter.
You do not need to call this routine yourself.
æKY ShowFields
æD PROCEDURE ShowFields(obj: TObject; doInspect: BOOLEAN);
æFi UDebug
æT PROCEDURE
æC ShowFields displays the names and values of an object’s fields in the Debug
Transcript.
The obj parameter is the object whose fields are to be displayed. If the value
of the doInspect parameter is TRUE, then MacApp opens a new Inspector window on
the object instead of displaying its fields in the Debug Transcript.
MacApp calls ShowFields from the MacApp Debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowHeapInfo
æD PROCEDURE ShowHeapInfo;
æFi UDebug
æT PROCEDURE
æC ShowHeapInfo displays information about the application heap in the Debug
Transcript.
MacApp calls ShowHeapInfo from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowHierarchy
æD FUNCTION ShowHierarchy(obj: TObject; theClass: ObjClassID): Longint;
æFi UDebug
æT PROCEDURE
æC ShowHierarchy displays the names of an object’s class and superclasses in the
Debug Transcript.
The obj parameter is the object whose superclasses are to be displayed. The
parameter theClass is the class identifier of the object.
MacApp calls ShowHierarchy from the MacApp debugger’s command interpreter. You
do not need to call this routine yourself.
æKY ShowLocals
æD PROCEDURE ShowLocals(level: INTEGER; topFrame: Longint);
æFi UDebug
æT PROCEDURE
æC ShowLocals displays the names and values of all the variables local to the
current stack frame in the Debug Transcript.
The level parameter is the current depth of the application stack. The topFrame
parameter is the top stack frame.
MacApp calls ShowLocals from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowMemory
æD PROCEDURE ShowMemory(startAddress, numBytes: Longint);
æFi UDebug
æT PROCEDURE
æC ShowMemory displays the contents of the specified region of memory in the
Debug Transcript.
The startAddress parameter is the address in memory at which the area to be
displayed begins. The numBytes parameter is the number of bytes to display.
MacApp calls ShowMemory from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowNames
æD PROCEDURE ShowNames(VAR procName: MAName; segNum: INTEGER);
æFi UDebug
æT PROCEDURE
æC ShowNames displays a routine name and its segment number in the Debug Transcript.
The procName parameter is the name to be displayed. The segNum parameter is the
routine’s segment number.
MacApp calls ShowNames from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowParameters
æD PROCEDURE ShowParameters(level: INTEGER; topFrame: Longint);
æFi UDebug
æT PROCEDURE
æC ShowParameters displays the parameters passed in the current stack frame.
The level parameter is the current depth of the application stack. The topFrame
parameter is the top stack frame.
MacApp calls ShowParameters from the MacApp debugger’s command interpreter. You
do not need to call this routine yourself.
æKY ShowRecent
æD PROCEDURE ShowRecent;
æFi UDebug
æT PROCEDURE
æC ShowRecent displays a recent history of the program-counter register in the
Debug Transcript.
MacApp calls ShowRecent from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowStack
æD PROCEDURE ShowStack;
æFi UDebug
æT PROCEDURE
æC ShowStack displays the application stack in the Debug Transcript.
MacApp calls ShowStack from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowStatus
æD PROCEDURE ShowStatus;
æFi UDebug
æT PROCEDURE
æC ShowStatus displays the states of the MacApp debugger’s various flags and
variables in the Debug Transcript.
MacApp calls ShowStatus from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowSymbolWhich
æD PROCEDURE ShowSymbolWhich(which: ZT; VAR procName: MAName; segNum: INTEGER);
æFi UDebug
æT PROCEDURE
æC ShowSymbolWhich displays in the Debug Transcript the symbols that the MacApp
debugger uses to indicate routine entries, exits, and errors.
The which parameter specifies which of the various symbols are to be displayed.
The procName parameter is the name of the routine that is to be displayed. The
segNum parameter is the segment number of the routine.
MacApp calls ShowSymbolWhich from the MacApp debugger’s command interpreter. You
do not need to call this routine yourself.
æKY ShowTempSpace
æD PROCEDURE ShowTempSpace(VAR lockedSpace, totalSpace: Longint);
æFi UDebug
æT PROCEDURE
æC ShowTempSpace displays a report on the condition of the allocation area for
temporary memory in the Debug Transcript.
The lockedSpace parameter is the total size of temporary allocations that are
locked. The totalSpace parameter is the is the total size of all temporary allocations.
MacApp calls ShowTempSpace from the MacApp debugger’s command interpreter. You
do not need to call this routine yourself.
æKY ShowWhere
æD PROCEDURE ShowWhere;
æFi UDebug
æT PROCEDURE
æC ShowWhere displays the handle to the receiver of a message and the name of
the object’s class in the Debug Transcript.
MacApp calls ShowWhere from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY ShowWhich
æD PROCEDURE ShowWhich(which: ZT; VAR procName: MAName; segNum: INTEGER);
æFi UDebug
æT PROCEDURE
æC ShowWhich displays the handle to the receiver of a message and the name of
the object’s class in the Debug Transcript.
The which parameter specifies which logical code block type is to be shown;
valid values are tBegin, tEnd, tExit, tBeginEndPair, tProgBreak, tSysError,
tVBL, and tReadLn. The procName parameter is the name of the routine to be displayed.
The segNum parameter is the routine’s segment number.
MacApp calls ShowWhich from the MacApp debugger’s command interpreter. You do
not need to call this routine yourself.
æKY StdAlert
æD PROCEDURE StdAlert(alertID: INTEGER);
æFi UMacApp
æT PROCEDURE
æC StdAlert displays a standard alert box.
The alertID parameter is the number of an 'ALRT' resource that MacApp uses to
create the alert box.
MacApp uses StdAlert to display a number of standard error messages. You can use
StdAlert for similar purposes, but you will probably prefer to use the global
routine MacAppAlert, which is more flexible.
æKY StdFieldToString
æD PROCEDURE StdFieldToString(theData: Ptr; fieldType: INTEGER;
VAR theString: Str255);
æFi UMacAppUtilities
æT PROCEDURE
æC StdFieldToString converts a field of an object to a string.
The parameter theData is a pointer to the field. The fieldType parameter specifies
the type of the field. Types are specified using the type constants defined in
the file UMacAppUtilities.p. StdFieldToString stores the resulting string in the
parameter theString when the routine returns.
MacApp stores StdFieldToString in the global variable gFieldToStringRtn. You can
use the routine stored in this variable to convert fields to strings if you need
to display them as text.
æKY StdHelpProc
æD PROCEDURE stdHelpProc;
æFi UDebug
æT PROCEDURE
æC StdHelpProc displays a brief prompt in the Debug Transcript.
MacApp uses StdHelpProc to prompt you to type a single-letter command in the
Debug Transcript. You do not need to call this routine yourself.
æKY StdNoRect
æD PROCEDURE StdNoRect(verb: GrafVerb; r: Rect);
æFi UMacAppUtilities
æT PROCEDURE
æC StdNoRect is installed as one of the low-level QDProcs to filter out QuickDraw
rectangle-drawing calls.
The verb parameter is a standard QuickDraw drawing routine as defined in the
GrafVerb type. The r parameter is the rectangle passed with the drawing routine.
StdNoRect is used internally by the global routine MATextBox. You never need to
call it yourself.
æKY StripLong
æD FUNCTION StripLong(address: UNIV Ptr): LONGINT;
æFi UMacAppUtilities
æT PROCEDURE
æC If the system is running in 24-bit addressing mode, StripLong returns the
value of the low-order three bytes of the specified LongInt value. If the system
is in 32-bit mode, however, StripLong simply passes back the LongInt value unchanged.
The address parameter is the LongInt value that is to be stripped.
MacApp calls StripLong from several routines that manipulate address directly.
You can use this routine to ensure that an address is a valid 32-bit clean address;
that is, that all bits in the LongInt are part of the address, and none are
flags or other non-address data.
æKY SubstituteInTitle
æD FUNCTION SubstituteInTitle(VAR title: Str255; newStuff: Str255;
preDocname, constTitle: INTEGER): BOOLEAN;
æFi UMacApp
æT PROCEDURE
æC SubstituteInTitle substitutes new text into a window title template as parsed
by the global routine ParseTitleTemplate. This routine returns TRUE if a substitution
was made.
The title parameter is the title template to be used as a window title;
SubstituteInTitle stores new text in the template when it returns. The newStuff
parameter is the text to be added to the title template. The preDocname parameter
is the length of the portion of the title template that precedes the name of the
document associated with the window. The constTitle parameter is the number of
characters that do not change in window titles.
MacApp calls SubstituteInTitle when creating document windows. You usually do
not need to call this routine yourself.
æKY SubVPt
æD PROCEDURE SubVPt(srcVPt: VPoint; VAR dstVPt: VPoint);
æFi UViewCoords
æT PROCEDURE
æC SubVPt computes the difference between the x and y coordinates of two specified
points and changes the second point to the resulting value.
The horizontal and vertical coordinates of the parameter dstVPt are subtracted
from the corresponding coordinates of the parameter srcVPt. The result is returned
in dstVPt.
MacApp uses SubVPt to compute the differences between view points. You can use
this routine in a similar fashion.
æKY Success
æD PROCEDURE Success(VAR fi: FailInfo);
æFi UFailure
æT PROCEDURE
æC Success removes the top failure handler from the global failure-handler stack.
The fi parameter is the failure information record that corresponds to the top
failure handler in the stack.
MacApp uses Success to remove its exception handlers when they are no longer
needed. You can use this routine in a similar fashion.
æKY TestRecoverHandle
æD FUNCTION TestRecoverHandle(masterPointer: Ptr; h: UNIV Handle): Boolean;
æFi UMacAppUtilities
æT PROCEDURE
æC TestRecoverHandle compares the specified handle value with the value returned
by the Toolbox function RecoverHandle for a specified master pointer.
The h parameter is the handle expected to result from a call to the Toolbox
routine RecoverHandle; the TestRecoverHandle routine returns TRUE if RecoverHandle
returns the handle specified by the h parameter. The masterPointer parameter is
the pointer that is the argument to RecoverHandle.
MacApp calls this routine from debugging routines that verify a handle’s validity.
You usually do not need to call this routine yourself.
æKY TextStyleFields
æD PROCEDURE TextStyleFields(aTitle: Str255; VAR aStyle: TextStyle;
PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr; fieldType: INTEGER));
æFi UMacAppUtilities
æT PROCEDURE
æC TextStyleFields performs a procedure on the fields of a TextStyle record.
The parameter aTitle is the name of the TextStyle record. The parameter aStyle
is the TextStyle record itself. The parameter DoToField is the procedure that is
performed on each of the fields of the record. You must define this procedure
separately. It can have any name, but must take three parameters: the fieldName
parameter is the name of the current field; the fieldAddr parameter is its address;
and the fieldType parameter is a type specifier as defined in UMacAppUtilities.p.
MacApp uses TextStyleFields when inspecting TextStyle records. You usually do
not need to call this routine yourself.
æKY ToggleCmd
æD PROCEDURE ToggleCmd;
æFi UDebug
æT PROCEDURE
æC ToggleCmd prompts the user by displaying in the Debug Transcript a list the
MacApp debugger’s flags and a request for the user to type a single-letter command.
The flag that corresponds to the entered character is then switched on or off.
MacApp calls ToggleCmd from the MacApp debugger’s command processor. You do not
need to call this routine yourself.
æKY TotalTempSize
æD FUNCTION TotalTempSize(justLocked: BOOLEAN; VAR canPurge: Handle): Size;
æFi UMemory
æT PROCEDURE
æC TotalTempSize returns the total number of bytes allocated in temporary blocks
of memory or the total number allocated in locked temporary blocks.
The justLocked parameter specifies whether to return the total of all temporary
blocks, or only those that are locked; if its value is TRUE, then only locked
blocks are counted. The canPurge parameter contains a handle to an unlocked
block when the routine returns.
MacApp calls TotalTempSize from a few global routines that allocate or otherwise
manipiulate memory directly. You usually do not need to call this routine yourself,
but you can use it if you need to determine how much temporary memory is allocated.
æKY TraceMenuName
æD FUNCTION TraceMenuName(aCmd: CmdNumber): CHAR;
æFi UMenuSetup
æT PROCEDURE
æC TraceMenuName displays the text and command number of a menu item in the
Debug Transcript. The routine returns the space character.
The parameter aCmd is the command number associated with the menu item.
MacApp calls TraceMenuName from several menu-handling routines in debugging
versions of applications. You do not need to call this routine yourself.
æKY TrapExists
æD FUNCTION TrapExists(theTrap: INTEGER): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC TrapExists returns TRUE if there is a routine defined for the specified trap
number. The parameter theTrap is the trap number to be tested.
MacApp calls TrapExists from several low-level operations that need information
about the system in order to function correctly. You can use this routine to
determine whether a particular system trap is implemented before attempting to
call it.
æKY TrcEnable
æD FUNCTION TrcEnable(okToTrace: BOOLEAN): BOOLEAN;
æFi UDebug
æT PROCEDURE
æC TrcEnable turns the MacApp debugger’s tracing features on and off. It returns
the previous state of the tracing features.
The okToTrace parameter specifies whether tracing is to be turned on or off; if
its value is TRUE, then tracing will be turned on.
MacApp calls TrcEnable from several routines that turn tracing functions on and
off. You do not need to call this routine yourself.
æKY UnionVRect
æD PROCEDURE UnionVRect(src1, src2: VRect; VAR dstRect: VRect);
æFi UViewCoords
æT PROCEDURE
æC UnionVRect computes a rectangle that encloses the union of two other rectangles
and returns the result in the specified variable.
The parameters src1 and src2 are the view rectangles whose union is to be computed.
The dstRect parameter contains the resulting rectangle when the routine returns.
MacApp calls UnionVRect from TGridView methods that compute an area that encloses
two rectangular cells. You can use this routine when you need to compute the
rectangle that encloses any two view rectangles.
æKY UnloadAllSegments
æD PROCEDURE UnloadAllSegments;
æFi UMemory
æT PROCEDURE
æC UnloadAllSegments purges all code segments from memory, except resident segments.
MacApp calls UnloadAllSegments when the application starts up and when it has
too little memory to safely perform some operations. You usually do not need to
call this routine yourself.
æKY UnpatchAll
æD PROCEDURE UnpatchAll;
æFi UPatch
æT PROCEDURE
æC UnpatchAll removes all patches to system traps that were installed using the
HeadPatch, Head1Patch, and PatchTrap routines.
MacApp calls UnpatchAll when the application starts up and when it terminates.
You usually do not need to call this routine yourself.
æKY UnpatchTrap
æD PROCEDURE UnpatchTrap(VAR thePatch: TrapPatch);
æFi UPatch
æT PROCEDURE
æC UnpatchTrap removes a patch from a system trap.
The parameter thePatch is the TrapPatch record that corresponds to the trap to be
removed.
MacApp calls UnpatchTrap from several routines that restore the system to its
original state. You usually do not need to call this routine yourself.
æKY UprChar
æD FUNCTION UprChar(ch: CHAR): CHAR;
æFi UMacAppUtilities
æT PROCEDURE
æC UprChar returns the uppercase character that corresponds to the specified
character.
The ch parameter is the character that will be changed to uppercase. If ch is
already an uppercase character, then it is returned unchanged.
MacApp calls UprChar from several routines used by the MacApp debugger’s command
handler. You can use this routine when you need to convert lowercase characters
to uppercase ones.
æKY UprMAName
æD PROCEDURE UprMAName(VAR s: MAName);
æFi UMacAppUtilities
æT PROCEDURE
æC UprMAName converts all the characters in a name to their uppercase equivalents.
The s parameter is the name to be converted when UprMAName is called; it is the
converted name when the routine returns.
MacApp calls UprMAName from the global routine GetClassIDFromName. You usually
do not need to call this routine yourself.
æKY UprStr255
æD PROCEDURE UprStr255(VAR s: Str255);
æFi UMacAppUtilities
æT PROCEDURE
æC UprStr255 converts all the characters in a string to their uppercase equivalents.
The s parameter is the string to be converted when UprStr255 is called; it is
the converted string when the routine returns.
MacApp calls UprStr255 from a few global routines that convert all the characters
in a string to uppercase. You can use this routine in a similar fashion.
æKY UseROMMap
æD PROCEDURE UseROMMap(resLoad: BOOLEAN);
æFi UMacAppUtilities
æT PROCEDURE
æC UseROMMap instructs the system to use the resources in the ROM rather than
those in the system in Resource Manager calls, so that those calls can use resources
stored in the ROM.If the value of the ResLoad parameter is TRUE, then the resource
is loaded into memory.
MacApp calls UseROMMap when installing the busy-cursor image. You can call this
routine when you make Resource Manager calls for which you want ROM resources to
be available.
æKY UseSelectionColor
æD PROCEDURE UseSelectionColor;
æFi UMacAppUtilities
æT PROCEDURE
æC UseSelectionColor exchanges the background color and the highlight color in
the destionation. This has the visual effect of using a highlighting pen to
select the object. The change affects only the next QuickDraw operation; after
it is done, the pen’s color changes to what it was before the operation.
MacApp calls UseSelectionColor when drawing the highlights for text and other
elements in views. You can use this routine in a similar fashion.
æKY UseTempRgn
æD PROCEDURE UseTempRgn(byWhom: Str255);
æFi UMacApp
æT PROCEDURE
æC UseTempRgn prevents the application from using the gTempRgn global variable
in two routines at once.
The parameter byWhom is the name of (or other relevant information about) the routine
that is using gTempRgn.
MacApp calls UseTempRgn from a variety of routines that use gTempRgn as a temporary
region for computations. You can call this routine before using gTempRgn, and
MacApp will break into the debugger if gTempRgn is already in use.
æKY ValidateConfiguration
æD FUNCTION ValidateConfiguration(configuration: ConfigRecord): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC ValidateConfiguration checks the characteristic of the system on which the
application is running. If it does not match the application’s requirements,
MacApp displays an alert box informing the user that the application cannot run
on the system and then terminates the application.
The configuration parameter stores the configuration record for the machine.
You can call ValidateConfiguration when your application starts to ensure that
the machine that launched it can support its features.
æKY ValidateMenuBar
æD PROCEDURE ValidateMenuBar;
æFi UMenuSetup
æT PROCEDURE
æC ValidateMenuBar sets the value of gRedrawMenuBar to FALSE.
MacApp calls this routine after updating the menu bar. You usually do not need
to call this routine yourself.
æKY ValidateMenus
æD PROCEDURE ValidateMenus;
æFi UMenuSetup
æT PROCEDURE
æC ValidateMenus sets the value of gMenusAreSetup to TRUE.
MacApp calls this routine after setting up the menus. You usually do not need to
call this routine yourself.
æKY VBLInstall
æD PROCEDURE VBLInstall;
æFi UDebug
æT PROCEDURE
æC VBLInstall installs the MacApp debugger’s VBL tasks.
MacApp calls VBLInstall from the global routine InitUDebug. You do not need to
call this routine yourself.
æKY VBLRemove
æD PROCEDURE VBLRemove;
æFi UDebug
æT PROCEDURE
æC VBLRemove removes the MacApp debugger’s VBL tasks.
MacApp calls VBLRemove from the global routine DebugTerminate. You do not need
to call this routine yourself.
æKY VerboseIsHandle
æD FUNCTION VerboseIsHandle(h: UNIV Handle): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC VerboseIsHandle returns TRUE if the specified value is a valid handle. If it
is not a valid handle, then the routine displays diagnostic information about it
in the Debug Transcript.
The h parameter is the value to be tested.
MacApp calls VerboseIsHandle from the global routines DisposeIfHandle and
VerboseIsObject. You can use this routine to test the validity of handles in debugging
versions of your application.
æKY VerboseIsObject
æD FUNCTION VerboseIsObject(obj: UNIV TObject): BOOLEAN;
æFi UObject
æT PROCEDURE
æC VerboseIsObject returns TRUE if the specified value is a reference to an
object. If the value is not a reference to an object, then the routine displays
diagnostic information about the value in the Debug Transcript.
The obj parameter is the value to be tested.
MacApp calls VerboseIsObject from global failure routines and from certain routines
that operate on the fields of objects. You can use this routine to test the
validity of objects in debugging versions of your application.
æKY VisibleRect
æD PROCEDURE VisibleRect(VAR r: Rect);
æFi UMacApp
æT PROCEDURE
æC VisibleRect computes the visible portion of a QuickDraw rectangle.
The r parameter is the rectangle to be tested when the routine is called; it is
the visible portion of the rectangle when the routine returns.
MacApp calls VisibleRect from several methods that draw the contents of TView
objects. You can use this routine when you want to limit drawing to a visible
area.
æKY VPtToPt
æD FUNCTION VPtToPt(theVPt: VPoint): Point;
æFi UViewCoords
æT PROCEDURE
æC VPtToPt returns a QuickDraw point whose coordinates are the same as those of
the specified view point.
The parameter theVPt is the view point to be copied.
MacApp calls VPtToPt from a variety of routines that convert from a view point
into a QuickDraw point. You can use this routine in a similar fashion.
æKY VRectsNest
æD FUNCTION VRectsNest(outer, inner: VRect): BOOLEAN;
æFi UMacAppUtilities
æT PROCEDURE
æC VRectsNest returns TRUE if the view coordinates of the second rectangle specified
are contained (nested) within those of the first rectangle specified.
The outer parameter specifies the rectangle thought to contain the rectangle
specified by the parameter inner.
MacApp never calls this routine; it is provided for your convenience. You can
use it to determine whether one rectangle is nested inside another.
æKY VRectToRect
æD PROCEDURE VRectToRect(theVRect: VRect; VAR theRect: Rect);
æFi UViewCoords
æT PROCEDURE
æC VRectToRect modifies a QuickDraw rectangle so that it has the same defining
points as the specified view rectangle.
The parameter theVRect is the view rectangle whose coordinates are to be copied.
The parameter theRect is the QuickDraw rectangle to be modified when the routine
is called and is the modified rectangle when the routine returns.
MacApp calls VRectToRect from a variety of routines that convert from a view
rectangle into a QuickDraw rectangle. You can use this routine in a similar
fashion.
æKY WindCmd
æD PROCEDURE WindCmd;
æFi UDebug
æT PROCEDURE
æC WindCmd displays a prompt and awaits a single-character command from the
user. Depending on the character that the user types, the routine brings the
Debug Transcript to the front, sends it to the back, or changes its font.
MacApp calls WindCmd from the MacApp debugger’s command processor. You do not
need to call this routine yourself.
æKY WithApplicationResFileDo
æD PROCEDURE WithApplicationResFileDo(PROCEDURE DoWithResFile);
æFi UMacAppUtilities
æT PROCEDURE
æC WithApplicationResFileDo performs a procedure with the application’s resource
fork as the current resource file.
The parameter DoWithResFile is a procedure that you define separately. It can
have any name, but it cannot take parameters.
MacApp calls WithApplicationResFileDo from several global routines that load or
otherwise manipulate application resources. You can use this routine when you
need to ensure that the application’s resource fork is the current resource
file.
æKY WithCodeResFileDo
æD PROCEDURE WithCodeResFileDo(PROCEDURE DoWithResFile);
æFi UMemory
æT PROCEDURE
æC WithCodeResFileDo performs the DoWithResFile procedure on the resource file
having the reference number specified by gCodeRefNum.
The parameter DoWithResFile is a procedure that you define separately. It can
have any name, but it cannot take parameters.
MacApp uses WithCodeResFileDo to load and unload code segments.
æKY WithHideFromMacAppDo
æD PROCEDURE WithHideFromMacAppDo(PROCEDURE WhatToDo; itsHideType: HideType);
æFi UDebug
æT PROCEDURE
æC WithHideFromMacAppDo permits a routine to execute without affecting MacApp’s
state.
The WhatToDo procedure is a procedure that you declare separately. It can have
any name, but it must accept the itsHideType parameter, which determines whether
the procedure is completely hidden from MacApp or remains accessible enough that
the MacApp debugger can halt its execution. If the value of itsHideType is RawHide,
then MacApp can access the global variables. If the value of itsHideType is
PartialHide, then MacApp can do a WriteLn to the Debug Transcript. If the value
of itsHideType is FullHide, then the procedure is completely hidden and MacApp
can fully operate the Debugger.
MacApp calls WithHideFromMacAppDo from certain low-level debugging routines. You
do not need to call this routine yourself.
æKY WriteBoolean
æD PROCEDURE WriteBoolean(b: BOOLEAN);
æFi UMacAppUtilities
æT PROCEDURE
æC MacAppWriteBoolean displays a Boolean value in the Debug Transcript.
MacApp calls WriteBoolean from debugging code that displays the values of Boolean
fields and variables. You usually do not need to call this routine yourself.
æKY WriteChar
æD PROCEDURE WriteChar(index: INTEGER; hText: Handle);
æFi UTEView
æT PROCEDURE
æC WriteChar displays a character from the specified text record in the Debug
Transcript.
The index parameter is the position of the character in the text record. The
hText parameter is a handle to the text record.
MacApp calls WriteChar from the global routine DumpTERecord. You do not need to
call this routine yourself.
æKY WriteFocus
æD PROCEDURE WriteFocus;
æFi UMacApp.Globals
æT PROCEDURE
æC WriteFocus displays the values of gLongOffset, the view's portRect, the view’s
visible region, and the view’s clip region in the Debug Transcript.
MacApp never calls this routine; it is provided for your convenience. You can
call it to obtain information about the current focus.
æKY WriteHandleContents
æD PROCEDURE WriteHandleContents(theHandle: UNIV Handle);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteHandleContents displays the contents of the specified handle in the
Debug Transcript.
The parameter theHandle is the handle whose contents are to be displayed.
You can use WriteHandleContents to display the contents of handles in
the Debug Transcript.
æKY WriteHexInt
æD PROCEDURE WriteHexInt(theInt: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteHexInt displays the specified integer in hexadecimal form in the Debug
Transcript.
The parameter theInt is the integer to be displayed.
You can use WriteHexInt to display hexadecimal numbers in the Debug Transcript.
æKY WriteHexLongint
æD PROCEDURE WriteHexLongint(theLongint: LONGINT);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteHexLongint displays the specified LongInt quantity in hexadecimal form
in the Debug Transcript.
The parameter theLongint is the LongInt to be displayed.
MacApp calls WriteHexLongint to display certain pointers and handles in the
Debug Transcript. You can use WriteHexLongint, to display LongInt values, including
pointers and handles, in the Debug Transcript.You can use WriteHexInt to display
hexadecimal numbers in the Debug Transcript.
æKY WritePt
æD PROCEDURE WritePt(pt: Point);
æFi UMacAppUtilities
æT PROCEDURE
æC WritePt displays a QuickDraw point in the Debug Transcript.
The pt parameter is the point to be displayed.
MacApp calls WritePt in intense debugging mode to display point quantities during
scrolling. You can use WritePt to display points in the Debug Transcript.
æKY WritePtr
æD PROCEDURE WritePtr(val: UNIV LONGINT);
æFi UMacAppUtilities
æT PROCEDURE
æC WritePtr displays a pointer, in hexadecimal form, in the Debug Transcript.
The val parameter is the pointer to be displayed.
MacApp calls WritePtr from a variety of inspection and debugging routines to
display pointers in the Debug Transcript. You can use WritePtr in a similar
fashion.
æKY WriteRect
æD PROCEDURE WriteRect(r: Rect);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteRect displays a rectangle’s corner points in the Debug Transcript.
The r parameter is the rectangle to be displayed.
MacApp calls WriteRect from a variety of inspection and debugging routines to
display rectangles in the Debug Transcript. You can use WriteRect in a similar
fashion.
æKY WriteReserves
æD PROCEDURE WriteReserves;
æFi UMemory
æT PROCEDURE
æC WriteReserves displays the temporary-memory reserve and low-memory reserve in
the Debug Transcript.
You can use WriteReserves to display the MacApp memory reserves in the Debug
Transcript when debugging.
æKY WriteSig
æD PROCEDURE WriteSig(theID: IDType);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteSig displays the signature, or type identifier, of the specified type in
the Debug Transcript.
The parameter theID is the type identifier that is to be written.
You can use WriteReserves to display type identifiers in the Debug Transcript.
æKY WriteVPt
æD PROCEDURE WriteVPt(pt: VPoint);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteVPt displays a view point in the Debug Transcript.
The pt parameter is the view point to be written.
MacApp calls WriteVPt from certain TView methods in intense debugging mode to
display point values in the Debug Transcript. You can use this routine in a
similar fashion.
æKY WriteVRect
æD PROCEDURE WriteVRect(r: VRect);
æFi UMacAppUtilities
æT PROCEDURE
æC WriteVRect displays a view rectangle's coordinates in the Debug Transcript.
The r parameter is the view rectangle to be written.
You can use WriteVRect to display view rectangles in the Debug Transcript.
æKY WrLblBoolean
æD PROCEDURE WrLblBoolean(aLabel: Str255; b: BOOLEAN);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblBoolean displays a string followed by the equal sign and the specified
Boolean value in the Debug Transcript.
The parameter aLabel is the string to be displayed with the Boolean value. The b
parameter is the Boolean value to be displayed.
MacApp calls WrLblBoolean when it must display a named Boolean value in the
Debug Transcript. You can use this routine in a similar fashion.
æKY WrLblField
æD PROCEDURE WrLblField(fieldName: Str255; fieldAddr: Ptr; fieldType: INTEGER);
æFi UObject
æT PROCEDURE
æC WrLblField displays a field name followed by the equal sign and the value of
the field in the Debug Transcript.
The fieldName parameter is the name of the field to be displayed. The fieldAddr
parameter is a pointer to the field. The fieldType parameter is the type identifier
associated with the field’s data type.
MacApp calls WrLblField when it must display a field in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblHandleContents
æD PROCEDURE WrLblHandleContents(aLabel: Str255; theHandle: UNIV Handle);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblHandleContents displays a string followed by the equal sign and the
contents of the specified handle in the Debug Transcript.
The parameter aLabel is the string to be displayed. The parameter theHandle is
the handle whose contents are to be displayed.
MacApp calls WrLblHandleContents when it must display a handle in the Debug
Transcript. You can use this routine in a similar fashion.
æKY WrLblHexInt
æD PROCEDURE WrLblHexInt(theLabel: Str255; theInt: INTEGER);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblHexInt displays a string followed by the equal sign and the specified
integer in hexadecimal form in the Debug Transcript.
The parameter theLabel is the string to be displayed. The parameter theInt is
the integer to be displayed.
MacApp calls WrLblHexInt when it must display an integer in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblHexLongint
æD PROCEDURE WrLblHexLongint(theLabel: Str255; theLongint: LONGINT);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblHexLongint displays a string followed by the equal sign and the specified
LongInt value in hexadecimal form in the Debug Transcript.
The parameter theLabel is the string to be displayed. The parameter theInt is
the LongInt value to be displayed.
MacApp calls WrLblHexLongint when it must display a LongInt value in the Debug
Transcript. You can use this routine in a similar fashion.
æKY WrLblPt
æD PROCEDURE WrLblPt(aLabel: Str255; pt: Point);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblPt displays a string followed by the equal sign and the specified QuickDraw
point in the Debug Transcript.
The parameter aLabel is the string to be displayed. The pt parameter is the
point to be displayed.
MacApp calls WrLblPt when it must display a point in the Debug Transcript. You
can use this routine in a similar fashion.
æKY WrLblPtr
æD PROCEDURE WrLblPtr(aLabel: Str255; val: UNIV LONGINT);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblPtr displays a string followed by the equal sign and the specified Univ
LongInt value in hexadecimal form in the Debug Transcript.
The parameter aLabel is the string to be displayed. The parameter val is the
Univ LongInt value to be displayed.
MacApp calls WrLblPtr when it must display a pointer value in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblRect
æD PROCEDURE WrLblRect(aLabel: Str255; r: Rect);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblRect displays a string followed by the equal sign and the specified
QuickDraw rectangle’s corner points in the Debug Transcript.
The parameter aLabel is the string to be displayed. The r parameter is the rectangle
to be displayed.
MacApp calls WrLblRect when it must display a rectangle in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblSig
æD PROCEDURE WrLblSig(theLabel: Str255; theID: IDType);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblSig displays a string followed by the equal sign and the specified signature,
or type identifier, in the Debug Transcript.
The parameter theLabel is the string to be displayed. The parameter theID is the
signature to be displayed.
MacApp calls WrLblSig when it must display a signature in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblVPt
æD PROCEDURE WrLblVPt(aLabel: Str255; pt: VPoint);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblVPt displays a string followed by the equal sign and the specified view
point in the Debug Transcript.
The parameter aLabel is the string to be displayed. The pt parameter is the view
point to be displayed.
MacApp calls WrLblVPt when it must display a view point in the Debug Transcript.
You can use this routine in a similar fashion.
æKY WrLblVRect
æD PROCEDURE WrLblVRect(aLabel: Str255; r: VRect);
æFi UMacAppUtilities
æT PROCEDURE
æC WrLblVRect displays a string followed by the equal sign and the specified
view rectangle’s corner points in the Debug Transcript.
The parameter aLabel is the string to be displayed. The r parameter is the view
rectangle to be displayed.
MacApp calls WrLblVRect when it must display a view rectangle in the Debug Transcript.
You can use this routine in a similar fashion.
æKY XDebugAddrError
æD PROCEDURE XDebugAddrError;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugBusError
æD PROCEDURE XDebugBusError;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugCheck
æD PROCEDURE XDebugCheck;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugIllInst
æD PROCEDURE XDebugIllInst;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugLineF
æD PROCEDURE XDebugLineF;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugOverflow
æD PROCEDURE XDebugOverflow;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugSysError
æD PROCEDURE XDebugSysError;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY XDebugZeroDiv
æD PROCEDURE XDebugZeroDiv;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY YouAreWarned
æD FUNCTION YouAreWarned: BOOLEAN;
æFi UDebug
æT PROCEDURE
æC This routine is not yet documented; it is used internally by MacApp. You
never need to call it yourself.
æKY Global Variables
æKL
gAlwaysTrackCursor
gApp1MemList
gApp2MemList
gAppDone
gApplication
gApplicationRefNum
gApplicationStyle
gAskAboutAlloc
gAskFailure
gAssumeFocused
gBoolString
gBreaksPenState
gBusyTempRgn
gCancelAllPrinting
gChooserOK
gClickCount
gClipClaimed
gClipOrphanage
gClipUndoView
gClipView
gClipWindow
gClipWrittenToDeskScrap
gCodeRefNum
gCodeSegs
gConfiguration
gCouldPrint
gCreateWithTemplates
gCurrPrintHandler
gCursorRgn
gDeadStripSuppression
gDebugPrinting
gDefClikLoopProc
gDocList
gDrawingPictScrap
gDrawingPictScrapView
gEnableDoubleBuffering
gErrorParm3
gEventLevel
gExperimenting
gFakeWindow
gFieldToStrRtn
gFileCount
gFinderHPrint
gFinderPrinting
gFocusedView
gFreeWindowList
gGotClipType
gGZPurgeNotify
gHeadCohandler
gIdlePhase
gInBackground
gInFilter
gInhibitNestedHandling
gInitialized
gIntenseDebugging
gIsLoadedSeg
gIsResidentSeg
gJobPrintHandler
gLastClickPart
gLastDeskAcc
gLastMsePt
gLastUpTime
gLongOffset
gLowSpaceInterval
gMacAppAlertFilter
gMainEventMask
gMainFileType
gMastReport
gMATextBoxTE
gMaxLockedRsrc
gMaxStackDepth
gMBarDisplayed
gMBarHeight
gMBarHierarchical
gMBarNotDisplayed
gMemMgtBreak
gMenusAreSetup
gNewScrapStuff
gNextSpaceMsg
gNoChanges
gNullPrintHandler
gNumUntitled
gOldChooserFlag
gOldScrapStuff
gOrthogonal
gPageOffset
gPostCondition
gPreCondition
gPrefClipType
gPrintHandler
gPrinting
gRedrawMenuBar
gReportEvt
gReportInfo
gReportMenuChoices
gReportNext
gReportTime
gRGBBlack
gRGBWhite
gRsrcCheck
gRsrcReport
gSaveFocusRec
gSegReport
gSignatureCount
gSignatureIds
gSignatures
gSingleStep
gStdHysteresis
gStdPageMargins
gStdStaggerCount
gStdWMoveBounds
gStdWScreenRect
gStdWSizeRect
gStrippedAddress
gSysMemList
gSystemStyle
gSysWindowActive
gTarget
gTEDefaultWordBreak
gTempRgn
gToolBoxInitialized
gTopHandler
gTraceIdle
gTraceSetupMenus
gTracing
gUDialogInitialized
gUGridViewInitialized
gUndoCmd
gUndoState
gUnloadAllSegs
gUPrintingInitialized
gUsedBy
gUTEViewInitialized
gVarClipPicSize
gWasTrcEnable
gWorkPort
gWResSignature
gWResType
gZeroPt
gZeroRect
gZeroVPt
gZeroVRect
pCodeReserve
pCopyright
pCurrTEView
pCursorInfo
pDebugView
pDebugWindow
pDifference
pETSPatch
pFi
pInvalidateRgn
pLoadSegCalledFromOwnApp
pMaxSegNum
pMemReserve
pNoOfSegments
pOKCodeReserve
pOldResFile
pPatchList
pPermAllocation
pPixelsToHighlight
pPreviousSelection
pReserveExists
pReserveShortfall
pSegLoadPatch
pSegNeedsUnloading
pSzCodeReserve
pSzMemReserve
pTEIntenseDebugging
pVisibleCells
qDebug
qDebugTheDebugger
qExperimentalAndUnsupported
qInspector
qMacApp
qNames
qNeedsColorQD
qNeedsFPU
qNeedsHierarchicalMenus
qNeedsMC68020
qNeedsMC68030
qNeedsROM128K
qNeedsScriptManager
qNeedsStyleTextEdit
qNeedsWaitNextEvent
qPerform
qRangeCheck
qTemplateViews
qTrace
æKY gAlwaysTrackCursor
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Set to TRUE when you want to track the cursor regardless of whether it strays
outside gCursorRgn.
æKY gApp1MemList
æD HHandleList
æFi UMemory
æT VARIABLE
æC The value of gApp1MemList is initially set to NIL, allowing you to create lists
of handles and place them in either this variable or its counterpart,
gApp2MemList. (For example, one list might contain your application's permanent
handles, and the other might contain those that are based on the current
situation.) Each value stored in one of these lists should be a handle to a list
of other handles. If you modify either of these lists, call the global method
CheckReserve. It calls the global method BuildAllReserves to recompute the code
and low-space reserves. CheckReserve's result indicates whether the full code
reserve is present. Without a full code reserve, your program may crash because a
segment (or defproc) could not be loaded. The handles in the lists point to
resources that your application might require and are usually marked nonpurgeable;
the global method GrowZoneProc, however, can purge any of these handles that are
not locked.
æKY gApp2MemList
æD HHandleList
æFi UMemory
æT VARIABLE
æC The value of gApp2MemList is initially set to NIL, allowing you to create
lists of handles and place them in either this variable or its counterpart,
gApp1MemList. (For example, one list might contain your application's permanent
handles, and the other might contain those that are based on the current
situation.) Each value stored in one of these lists should be a handle to a list
of other handles. If you modify either of these lists, call the global method
CheckReserve. It calls the global method BuildAllReserves to recompute the code
and low-space reserves. CheckReserve's result indicates whether the full code
reserve is present. Without a full code reserve, your program may crash because a
segment (or defproc) could not be loaded. The handles in the lists point to
resources that your application might require and are usually marked nonpurgeable;
the global method GrowZoneProc, however, can purge any of these handles that are
not locked.
æKY gAppDone
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Set to TRUE when you want the application to terminate.
æKY gApplication
æD TApplication
æFi UMacApp
æT VARIABLE
æC A reference to the application object.
æKY gApplicationRefNum
æD INTEGER
æFi UMacAppUtilities
æT VARIABLE
æC The reference number of the application’s resource file.
æKY gApplicationStyle
æD TextStyle
æFi UMacApp
æT VARIABLE
æC The application’s default text style.
æKY gAskAboutAlloc
æD BOOLEAN
æFi UFailure
æT VARIABLE
æC If the value of gAskAboutAlloc is TRUE, MacApp® enters debug mode each time a
new object is created. The debugger displays the name of the last routine executed
and the type of object created. This allows you to check your application's memory
management. For more information, see Chapter 6 , “MacApp Debugging Facilities,”
in the MacApp 2.0 General Reference."
æKY gAskFailure
æD BOOLEAN
æFi UFailure
æT VARIABLE
æC If the value of gAskFailure is TRUE, MacApp enters the debugger on calls to
the global methods FailOSErr, FailResError, FailMemError, FailNILResource, and
FailSpaceIsLow, giving the user a chance to force an error. Thus, in debugging, it
can be used to simulate an error condition.
æKY gAssumeFocused
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC If the value of gAssumeFocused is TRUE, TView.AssumeFocused forces a program
break if the view is not focused. This variable is used only in debug mode.
æKY gBoolString
æD ARRAY [BOOLEAN] OF STRING[5]
æFi UMacAppUtilities
æT VARIABLE
æC Used by the MacApp debugger and the Inspector to display Boolean values.
æKY gBreaksPenState
æD PenState
æFi UPrinting
æT VARIABLE
æC The pen state to be used to draw page breaks.
æKY gBusyTempRgn
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that gTempRgn is in use. This variable is used internally by the
MacApp debugger.
æKY gCancelAllPrinting
æD BOOLEAN
æFi UPrinting
æT VARIABLE
æC MacApp sets the value of gCancelAllPrinting to TRUE if the user clicks the
“Cancel All Printing” button while printing from the Finder™.
æKY gChooserOK
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC If the value of gChooserOK is FALSE, the user is not allowed to change the
printer selection using the Chooser desk accessory while the application is
active; if the value is TRUE (the default set in InitUMacApp), then the ability to
choose printers is only disabled during background printing. If you want it set to
FALSE in your application, the right time to set this variable is after calling
InitUMacApp (where it is initialized to TRUE) and before calling InitUPrinting.
Note that changing the value of gChooserOK yourself is not recommended in the
MultiFinder® environment.
æKY gClickCount
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number of mouse clicks that have been saved up by TApplication.CountClicks,
which is called from TApplication.HandleMouseDown.
æKY gClipClaimed
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC MacApp sets the value of gClipClaimed to TRUE if the current command object
has used the Clipboard. When a Cut or Copy command fails, this variable is used
by the TApplication methods PerformCommand and ClaimClipboard to determine whether
the Clipboard has already been used by the DoIt command.
æKY gClipOrphanage
æD TView
æFi UMacApp
æT VARIABLE
æC The view that represents the Clipboard when the application has no provision to
display the Clipboard's contents.
æKY gClipUndoView
æD TView
æFi UMacApp
æT VARIABLE
æC The view that was previously installed in the Clipboard.
æKY gClipView
æD TView
æFi UMacApp
æT VARIABLE
æC The view that is currently installed in the Clipboard.
æKY gClipWindow
æD TWindow
æFi UMacApp
æT VARIABLE
æC The window that holds the Clipboard display.
æKY gClipWrittenToDeskScrap
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE if the Clipboard view has been written to the desk scrap.
æKY gCodeRefNum
æD INTEGER
æFi UMemory
æT VARIABLE
æC The reference number of the resource fork that contains the code resources for
the application.
æKY gCodeSegs
æD HHandleList
æFi UMemory
æT VARIABLE
æC A list of handles to all 'CODE' resources in the application resource fork.
æKY gConfiguration
æD ConfigRecord
æFi UMacAppUtilities
æT VARIABLE
æC The configuration of the system on which the application is running.
æKY gCouldPrint
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that printer code is present and initialized.
æKY gCreateWithTemplates
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC Performs the same task as gDeadStripSuppression; gDeadStripSuppression is
preferred.
æKY gCurrPrintHandler
æD TPrintHandler
æFi UMacApp
æT VARIABLE
æC When the application is printing, MacApp sets the value of gCurrPrintHandler
to the print handler. Its value is NIL if the application is not printing.
æKY gCursorRgn
æD RgnHandle
æFi UMacAppUtilities
æT VARIABLE
æC The current cursor region that is passed as the sleep region to the Toolbox
routine WaitNextEvent.
æKY gDeadStripSuppression
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC Allows you to fool the MPW Linker by conditioning the execution of a call to
Member with the arguments TObject(NIL) and className. Since the default (and
unchanging) value of gDeadStripSuppression is FALSE, the call to Member will not
be executed; however, its presence in the code will prevent the MPW Linker from
stripping out code for this class. (The linker optimizes object code by removing
code for any class that is not specifically referenced in executable code.) For an
example of the use of the gDeadStripSuppression variable, see the implementation
of the global routine DoInitUMacApp.
æKY gDebugPrinting
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC A MacApp debugger switch that enables and disables tracing of printing
operations.
æKY gDefClikLoopProc
æD ProcPtr
æFi UTEView
æT VARIABLE
æC The standard TextEdit click loop routine. For more information on TextEdit’s
click loop function, see page 380 of Inside Macintosh, Volume I.
æKY gDocList
æD TList
æFi UMacApp
æT VARIABLE
æC The list of currently open documents.
æKY gDrawingPictScrap
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC MacApp sets gDrawingPictScrap to TRUE if a view's Draw routine is being called
in order to create 'PICT' data in the desk scrap. If you want your Draw method to
place comments in the picture in the desk scrap, it can check this routine and
insert picture comments as appropriate.
æKY gDrawingPictScrapView
æD TView
æFi UMacApp
æT VARIABLE
æC The view currently being drawn in the 'PICT' scrap.
æKY gEnableDoubleBuffering
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE enables automatic double buffering when views are being drawn or scrolled.
Note: This variable is experimental and unsupported!
æKY gErrorParm3
æD Str255
æFi UMacApp
æT VARIABLE
æC When the global method ErrorAlert displays one of the standard alert boxes, the
value of gErrorParm3 replaces the last argument to the Toolbox routine ParamText.
If no value is supplied, ErrorAlert sets this to ' '. You can use gErrorParm3 to
parameterize the automatic alert boxes that MacApp displays; for example,
TDocument.ReadFromFile sets this variable to the document name.
æKY gEventLevel
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number of nested calls to TApplication.PollEvent.
æKY gExperimenting
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Switches an application's experimental features on or off; can be toggled from
the MacApp debugger.
æKY gFakeWindow
æD WindowRecord
æFi UMacApp
æT VARIABLE
æC A work port that is used internally by gWorkPort. This is not a real window,
just a port; it is created with its control list set to NIL.
æKY gFieldToStrRtn
æD ProcPtr
æFi UMacAppUtilities
æT VARIABLE
æC The address of the routine that converts fields to strings. The default value
is StdFieldToString. This variable is for internal use only.
æKY gFileCount
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number of files to open or print from the Finder™. MacApp sets the value
of gFileCount in the global routine DoInitUMacApp.
æKY gFinderHPrint
æD Handle
æFi UPrinting
æT VARIABLE
æC Passed as an argument to the Toolbox routine PrJobMerge when the application is
printing more than one document from the Finder™.
æKY gFinderPrinting
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC MacApp sets gFinderPrinting to TRUE if the application was opened only for the
purpose of printing documents from the Finder.
æKY gFocusedView
æD TView
æFi UMacApp
æT VARIABLE
æC The view that is currently focused.
æKY gFreeWindowList
æD TList
æFi UMacApp
æT VARIABLE
æC The list of windows that are not associated with a document.
æKY gGotClipType
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Set to TRUE by the global routine CanPaste if that routine can paste data of
the type currently in the Clipboard.
æKY gGZPurgeNotify
æD ProcPtr
æFi UMemory
æT VARIABLE
æC If the handle stored in gGZPurgeNotify is not NIL, it is passed as an argument
to the global procedure CallNotify, and CallNotify is called before the
GrowZoneProc global procedure purges a handle.
æKY gHeadCohandler
æD TEvtHandler
æFi UMacApp
æT VARIABLE
æC The event handler at the head of the linked list of global cohandlers.
æKY gIdlePhase
æD IdlePhase
æFi UMacApp
æT VARIABLE
æC The current idle phase (idleBegin, idleContinue, or idleEnd).
æKY gInBackground
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC MacApp sets gInBackground to TRUE if the application is currently running in
the background.
æKY gInFilter
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that the procedure MacAppAlertFilter is to re-enter MacApp to
handle updates.
æKY gInhibitNestedHandling
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that failure was signalled and the outermost event loop has not
been reached or the ErrorAlert routing has not yet shown the failure to the user.
You can set this variable to TRUE so that MacApp no longer handles activate or
update events and idling when it calls the global routine MacAppAlert.
æKY gInitialized
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that the TApplication.IApplication method has executed.
æKY gIntenseDebugging
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Switches intensive debugging on or off.
æKY gIsLoadedSeg
æD BoolListHandle
æFi UMemory
æT VARIABLE
æC Maintains a flag for each segment, indicating whether the segment is loaded,
and thus optimizing the global routine UnloadAllSegments.
æKY gIsResidentSeg
æD BoolListHandle
æFi UMemory
æT VARIABLE
æC Maintains a flag for each segment, indicating whether the segment is resident
and therefore is not to be unloaded (in the segment loader sense).
æKY gJobPrintHandler
æD TStdPrintHandler
æFi UPrinting
æT VARIABLE
æC The print handler in use for the current print job.
æKY gLastClickPart
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The last part of the window that the user clicked in. MacApp uses this
variable to determine whether a click is to be considered part of a double-click.
æKY gLastDeskAcc
æD LONGINT
æFi UMacApp
æT VARIABLE
æC The time of the most recent possible excursion to a Desk Accessory. This
variable is used in the UPrinting unit to determine whether the Chooser may have
been used.
æKY gLastMsePt
æD Point
æFi UMacApp
æT VARIABLE
æC The mouse coordinates of the last event passed to TApplication.CountClicks.
æKY gLastUpTime
æD LONGINT
æFi UMacApp
æT VARIABLE
æC The time of the last mouse-up event passed to TApplication.HandleMouseUp.
æKY gLongOffset
æD VPoint
æFi UMacApp
æT VARIABLE
æC The origin of a large view (one with vertical or horizontal coordinates greater
than the value of kMaxCoord); used to keep these views in synch with QuickDraw’s
origin. For more detailed information, see the comment in the source code for
TView.Focus.
æKY gLowSpaceInterval
æD LONGINT
æFi UMacApp
æT VARIABLE
æC If the value of gLowSpaceInterval is greater than or equal to 0, its value is
the frequency (in ticks) with which MacApp displays a low-space alert. (Its
default value is kLowSpaceInterval.) If the value of gLowSpaceInterval is less
than 0, MacApp doesn't display a low-space alert.
æKY gMacAppAlertFilter
æD ProcPtr
æFi UMacApp
æT VARIABLE
æC A pointer to the default filter procedure; MacApp initializes this variable to
NIL. You can set the value of gMacAppAlertFilter to point to the global function
MacAppAlertFilter, which maps keystrokes to the first character of button labels.
æKY gMainEventMask
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The event mask used in the application's main event loop. The value of this
variable is initialized by InitUMacApp.
æKY gMainFileType
æD OSType
æFi UMacApp
æT VARIABLE
æC The principal file type that can be opened or printed by the application; its
value is set in TApplication.IApplication. By default, TApplication.SFGetParms
returns this file type in its type list.
æKY gMastReport
æD BOOLEAN
æFi UDebug
æT VARIABLE
æC TRUE causes the MacApp debugger to report information regarding changes in the
number of master pointers.
æKY gMATextBoxTE
æD TEHandle
æFi UMacAppUtilities
æT VARIABLE
æC A working TEHandle for use exclusively by the global routine MATextBox. It
prevents the constant allocation and deallocation of a TE handle.
æKY gMaxLockedRsrc
æD LONGINT
æFi UMemory
æT VARIABLE
æC The maximum amount of memory consumed by locked resources.
æKY gMaxStackDepth
æD LONGINT
æFi UDebug
æT VARIABLE
æC The maximum stack space used to date in the program. This value is computed at
every call to the global routines %_BP, %_EP, and %_EX.
æKY gMBarDisplayed
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The identifier of the 'MBAR' resource containing the menus that have been read
into memory and installed in the menu bar. For more information, see the file
“UMacApp.p” for the comment regarding the constant kMBarDisplayed.
æKY gMBarHeight
æD INTEGER
æFi UMacAppUtilities
æT VARIABLE
æC The height, in pixels, of the menu bar.
æKY gMBarHierarchical
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The identifier of the 'MBAR' resource containing menus that pop up when the
user chooses a menu item.
æKY gMBarNotDisplayed
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The identifier of the 'MBAR' resource containing menus that are read into
memory but not installed in the menu bar.
æKY gMemMgtBreak
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC Set to TRUE to break into debugger rather than simply reporting memory
management information.
æKY gMenusAreSetup
æD BOOLEAN
æFi UMenuSetup
æT VARIABLE
æC TRUE means that all menu items are enabled or disabled correclty according to
the current state of the application. MacApp sets the value of gMenusAreSetup to
FALSE before every event; it is set to TRUE by TApplication.SetupTheMenus, which
is called at idleBegin. If your DoIdle method changes the target or makes other
changes that would alter the appearance of a menu, you must set gMenusAreSetup to
FALSE.
æKY gNewScrapStuff
æD ScrapStuff
æFi UMacApp
æT VARIABLE
æC Stores the latest InfoScrap record.This variable is used by methods that
compare the contents of gNewScrapStuff and gOldScrapStuff to determine whether the
desk scrap has changed.
æKY gNextSpaceMsg
æD LONGINT
æFi UMacApp
æT VARIABLE
æC The time when the next low-space message is to be displayed.
æKY gNoChanges
æD TCommand
æFi UMacApp
æT VARIABLE
æC A value to return when the handler does not return a command. This variable is
only for compatibility with previous versions of MacApp. In MacApp 2.0 you can
simply return NIL instead of using gNoChanges. You should carry out the command in
the DoMenuCommand method.
æKY gNullPrintHandler
æD TPrintHandler
æFi UMacApp
æT VARIABLE
æC Handles printing-related messages for views that don't print.
æKY gNumUntitled
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number to assign to the next Untitled document when the application
provides a template for creating numbered Untitled documents. If you use the
string <<<>>> in your window title, MacApp fills in the number of the Untitled
document for you.
æKY gOldChooserFlag
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC The state of the Chooser alert flag when the application opened; the state is
restored when the application terminates.
æKY gOldScrapStuff
æD ScrapStuff
æFi UMacApp
æT VARIABLE
æC Stores the last ScrapStuff record used in tracking the scrap. Used by methods
that compare the contents of gNewScrapStuff and gOldScrapStuff to determine
whether the desk scrap has changed.
æKY gOrthogonal
æD ARRAY [VHSelect] OF VHSelect
æFi UMacApp
æT VARIABLE
æC An orthogonal set of VHSelect values—that is, gOrthogonal [v] = h, and
gOrthogonal [h] = v.
æKY gPageOffset
æD VPoint
æFi UMacApp
æT VARIABLE
æC The offset of the page being printed, measured from the edge of the view.
æKY gPostCondition
æD Boolean
æFi UMacAppUtilities
æT VARIABLE
æC Set to TRUE if you want MacApp to do post-condition processing.
æKY gPreCondition
æD Boolean
æFi UMacAppUtilities
æT VARIABLE
æC Set to TRUE if you want MacApp to do pre-condition processing.
æKY gPrefClipType
æD ResType
æFi UMacApp
æT VARIABLE
æC The resource type of the current Clipboard contents.
æKY gPrintHandler
æD TPrintHandler
æFi UMacApp
æT VARIABLE
æC A global print-handler object for use in some standard printing-related
activities. This variable is initialized as a reference to gNullPrintHandler, but
if you call the global procedure InitPrinting, that procedure installs a
nontrivial print handler in gPrintHandler.
æKY gPrinting
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE if the application is currently printing.
æKY gRedrawMenuBar
æD BOOLEAN
æFi UMenuSetup
æT VARIABLE
æC If the value of gRedrawMenuBar is TRUE, then the Toolbox routine DrawMenuBar is
called by TApplication.SetupTheMenus. If you have menus that are not handled by
MacApp, your implementations of DoSetupMenus methods can set this variable to
TRUE to force the menu bar to be redrawn.
æKY gReportEvt
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC A MacApp debugger switch that enables and disables MacApp’s event-reporting
features.
æKY gReportInfo
æD Str255
æFi UDebug
æT VARIABLE
æC If gReportInfo and gReportNext not empty strings, the contents of gReportInfo
are reported on the next call to the global methods %_BP or %_EP.
æKY gReportMenuChoices
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC A MacApp debugger switch that enables and disables MacApp’s command-tracing
features.
æKY gReportNext
æD BOOLEAN
æFi UDebug
æT VARIABLE
æC If the value of gReportNext is TRUE, the debugger reports pending information
(such as gReportInfo) on the next call to the global methods %_BP or %_EP.
æKY gReportTime
æD BOOLEAN
æFi UDebug
æT VARIABLE
æC If the value of gReportTime is TRUE, the debugger reports the tick count when
tracing.
æKY gRGBBlack
æD RGBColor
æFi UMacAppUtilities
æT VARIABLE
æC The RGB representation for black.
æKY gRGBWhite
æD RGBColor
æFi UMacAppUtilities
æT VARIABLE
æC The RGB representation for white.
æKY gRsrcCheck
æD INTEGER
æFi UMacApp
æT VARIABLE
æC Switches resource-usage checking on or off; this variable used by the Debugger.
æKY gRsrcReport
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC If the value of gRsrcReport is TRUE, the debugger reports the maximum size of
currently loaded resources.
æKY gSaveFocusRec
æD FocusRec
æFi UMacApp
æT VARIABLE
æC A place used for saving the focus to speed up scrolling.
æKY gSegReport
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC If the value of gSegReport is TRUE, the MacApp debugger reports a routine name
each time a segment is loaded. It is usually the routine that caused the segment
to be loaded; however, if the routine has no {$D++} program point, another routine
name may be displayed.
æKY gSignatureCount
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number of standard objects with signatures in the application. This
variable is used at initialization time to create a set of standard objects and
register them with the application object.
æKY gSignatureIds
æD ARRAY [1..kMaxSignatures] OF ObjClassId
æFi UMacApp
æT VARIABLE
æC An array of all the class identifiers of standard objects in the application.
æKY gSignatures
æD ARRAY [1..kMaxSignatures] OF IDType
æFi UMacApp
æT VARIABLE
æC An array of signatures for standard objects.
æKY gSingleStep
æD BOOLEAN
æFi UDebug
æT VARIABLE
æC Set to TRUE if you want MacApp to break into the debugger at the next
opportunity.
æKY gStdHysteresis
æD Point
æFi UMacApp
æT VARIABLE
æC The standard hysteresis value used in TView.HandleMouseDown.
æKY gStdPageMargins
æD Rect
æFi UPrinting
æT VARIABLE
æC Standard left, top, right, and bottom page margins, in screen resolution; the
default margins are one inch each.
æKY gStdStaggerCount
æD INTEGER
æFi UMacApp
æT VARIABLE
æC The number of windows created from templates. This variable is used to compute
the offset necessary for staggering windows as they are created.
æKY gStdWMoveBounds
æD Rect
æFi UMacApp
æT VARIABLE
æC The rectangle that defines the standard boundaries used to constrict the
movement of windows on the screen. This value is passed to the Toolbox routine
DragWindow.
æKY gStdWScreenRect
æD Rect
æFi UMacApp
æT VARIABLE
æC The rectangle defining the area in which one corner of a window must be located
to remain on the screen.
æKY gStdWSizeRect
æD Rect
æFi UMacApp
æT VARIABLE
æC The standard rectangle passed to the Toolbox routine GrowWindow.
æKY gStrippedAddress
æD Ptr
æFi UMacAppUtilities
æT VARIABLE
æC A pointer to an address already stripped by the Toolbox function StripAddress.
æKY gSysMemList
æD HHandleList
æFi UMemory
æT VARIABLE
æC The list of system handles used to compute current allocated temporary memory
(all 'PACK', 'LDEF', 'MDEF', 'CDEF', and 'WDEF' resources).
æKY gSystemStyle
æD TextStyle
æFi UMacApp
æT VARIABLE
æC The system's default text style.
æKY gSysWindowActive
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that the front window is a system window.
æKY gTarget
æD TEvtHandler
æFi UMacApp
æT VARIABLE
æC The TEvtHandler that gets the first chance at DoCommand, DoSetupMenu,
DoKeyCommand, and Idle commands. This value should never be NIL; if you do not
want your own target, set the value of gTarget to the application object.
æKY gTEDefaultWordBreak
æD ProcPtr
æFi UMacAppUtilities
æT VARIABLE
æC The default word-break routine used by TextEdit. Note: that this routine
(alone) does not take parameters using the Pascal calling conventions as required
by the Toolbox routine SetWordBreak and therefore must be set in the TextEdit
record by modifying the wordBreak field directly.
æKY gTempRgn
æD RgnHandle
æFi UMacApp
æT VARIABLE
æC A temporary region handle created in DoInitUMacApp.When debugging, call the
global method UseTempRgn before using gTempRgn. When you finish using gTempRgn,
call the global method DoneWithTempRgn. This ensures that two routines do not try
to use gTempRgn at the same time.
æKY gToolBoxInitialized
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the Toolbox has been initialized.
æKY gTopHandler
æD FailInfoPtr
æFi UFailure
æT VARIABLE
æC The most recent link in the linked list of failure handlers. The value of
gTopHandler is initially set to NIL by a constant in the file UFailure.a so that
failure handling never needs to be initialized.
æKY gTraceIdle
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC A value of TRUE causes the MacApp debugger to include idle handlers in the
list of program points displayed in the Debug Transcript window. The default value
is FALSE.
æKY gTraceSetupMenus
æD BOOLEAN
æFi UMenuSetup
æT VARIABLE
æC Set to TRUE if you want the MacApp debugger to include program points from the
menu setup cycle in the list displayed in the Debug Transcript window. The
default value is FALSE.
æKY gTracing
æD BOOLEAN
æFi UDebug
æT VARIABLE
æC Set to TRUE if you want the MacApp debugger to display the identifier for each
{$D++} program point executed.
æKY gUDialogInitialized
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the UDialog unit has been initialized.
æKY gUGridViewInitialized
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the UGridView unit has been initialized.
æKY gUndoCmd
æD CmdNumber
æFi UMacApp
æT VARIABLE
æC The global value of the generic Undo command.
æKY gUndoState
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Indicates whether an Undo or a Redo command is ready to be executed. TRUE
indicates that the command was done and can be undone, and FALSE indicates that
the command was undone and can be redone.
æKY gUnloadAllSegs
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC TRUE enables the UnloadAllSegments routine. Always set gUnloadAllSegs to TRUE
when you are not debugging.
æKY gUPrintingInitialized
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the UPrinting unit has been initialized.
æKY gUsedBy
æD Str255
æFi UMacApp
æT VARIABLE
æC The routine using gTempRgn.
æKY gUTEViewInitialized
æD BOOLEAN
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the UTEView unit has been initialized.
æKY gVarClipPicSize
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC TRUE indicates that pictures in the Clipboard are treated as variable size,
depending on the window size; the default value of FALSE causes pictures in the
Clipboard to be drawn and pasted at the size defined in the 'PICT' resource.
æKY gWasTrcEnable
æD BOOLEAN
æFi UMacApp
æT VARIABLE
æC Stores the tracing state across calls to Idle methods while the value of the
idle state changes from idleBegin to idleEnd.
æKY gWorkPort
æD GrafPtr
æFi UMacApp
æT VARIABLE
æC Stores a pointer to a grafPort that is created during MacApp initialization.
æKY gWResSignature
æD IDType
æFi UMacApp
æT VARIABLE
æC The four-letter class signature used by TView.WRes.
æKY gWResType
æD Str255
æFi UMacApp
æT VARIABLE
æC The string that identifies the class name of the resource being written by
TView.WRes.
æKY gZeroPt
æD Point
æFi UMacApp
æT VARIABLE
æC Contains the point (0,0), in global coordinates, for programming convenience.
æKY gZeroRect
æD Rect
æFi UMacApp
æT VARIABLE
æC Contains the rectangle (0,0,0,0), in global coordinates, for programming
convenience.
æKY gZeroVPt
æD VPoint
æFi UMacApp
æT VARIABLE
æC Contains the point (0,0), in view coordinates, for programming convenience.
æKY gZeroVRect
æD VRect
æFi UMacApp
æT VARIABLE
æC Contains the rectangle (0,0,0,0), in view coordinates, for programming
convenience.
æKY pCodeReserve
æD Handle
æFi UMemory
æT VARIABLE
æC The handle to the temporary reserve.
æKY pCopyright
æD StringHandle
æFi UMacApp
æT VARIABLE
æC A handle to the string containing the text of the copyright notice for MacApp.
æKY pCurrTEView
æD TTEView
æFi UTEView
æT VARIABLE
æC The currently active TTEView object. This variable is reserved for use by the
global function ClickLoopForTTEView.
æKY pCursorInfo
æD BOOLEAN
æFi UBusyCursor
æT VARIABLE
æC Set to TRUE when you want to track the cursor regardless of whether it strays
outside gCursorRgn.
æKY pDebugView
æD TTranscriptView
æFi UDebug
æT VARIABLE
æC The subview of pDebugWindow in which the Debug Transcript is drawn
æKY pDebugWindow
æD TWindow
æFi UDebug
æT VARIABLE
æC The TWindow object containing the subview that displays the debug transcript
æKY pDifference
æD RgnHandle
æFi UGridView
æT VARIABLE
æC The handle to a region that is the difference between a new selection and the
previous one. This variable is used by TGridView.SetSelection.
æKY pETSPatch
æD TrapPatch
æFi UMacApp
æT VARIABLE
æC The patch for the Toolbox trap ExitToShell.
æKY pFi
æD FailInfo
æFi UMacApp
æT VARIABLE
æC The outermost failure handler.
æKY pInvalidateRgn
æD RgnHandle
æFi UGridView
æT VARIABLE
æC The region to be invalidated by the method TGridView.InvalidateSelection.
æKY pLoadSegCalledFromOwnApp
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC This variable is not yet documented; it is used internally by MacApp. You
never need to use it yourself.
æKY pMaxSegNum
æD INTEGER
æFi UMemory
æT VARIABLE
æC The maximum segment number.
æKY pMemReserve
æD Handle
æFi UMemory
æT VARIABLE
æC The handle to the low-memory reserve.
æKY pNoOfSegments
æD INTEGER
æFi UMemory
æT VARIABLE
æC The number of code segments.
æKY pOKCodeReserve
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC TRUE indicates that the application has an adequate code reserve. FALSE
indicates that the application may crash if memory space is low.
æKY pOldResFile
æD INTEGER
æFi UMemory
æT VARIABLE
æC A reference to the old resource file; this reference is saved across segment
loads.
æKY pPatchList
æD Ptr
æFi UPatch
æT VARIABLE
æC The address of the linked list of patches.
æKY pPermAllocation
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC TRUE indicates that the handle must not be purged from memory.
æKY pPixelsToHighlight
æD RgnHandle
æFi UGridView
æT VARIABLE
æC The region to be highlighted by TGridView.HighlightCells.
æKY pPreviousSelection
æD RgnHandle
æFi UGridView
æT VARIABLE
æC The region selected prior to the current selection; used by
TGridView.SetSelection.
æKY pReserveExists
æD BOOLEAN
æFi UMemory
æT VARIABLE
æC TRUE indicates that the full-size code reserve is allocated.
æKY pReserveShortfall
æD LONGINT
æFi UMemory
æT VARIABLE
æC The amount by which the code reserve allocation falls short of the amount
requested.
æKY pSegLoadPatch
æD TrapPatch
æFi UMemory
æT VARIABLE
æC The patch for the Toolbox trap LoadSeg.
æKY pSegNeedsUnloading
æD BoolArrayHandle
æFi UMemory
æT VARIABLE
æC The handle to an array of Boolean values in which a flag for each segment
indicates whether the segment needs to be unloaded. This variable is used to
optimize the global routine UnloadAllSegments.
æKY pSzCodeReserve
æD Size
æFi UMemory
æT VARIABLE
æC The amount of memory MacApp attempts to reserve for the temporary code reserve
pCodeReserve.
æKY pSzMemReserve
æD Size
æFi UMemory
æT VARIABLE
æC The amount of memory MacApp attempts to reserve for the low-memory code
reserve pMemReserve.
æKY pTEIntenseDebugging
æD BOOLEAN
æFi UTEView
æT VARIABLE
æC Set to TRUE if you want the MacApp debugger to display information about
TTECommand objects and TERecords.
æKY pVisibleCells
æD RgnHandle
æFi UGridView
æT VARIABLE
æC The region containing the cells that are currently visible. This variable is
used by TGridView.CellsToPixels.
æKY qDebug
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application uses debugging code.
æKY qDebugTheDebugger
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the MacApp debugger is being debugged.
æKY qExperimentalAndUnsupported
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the user wants toexperiment the new, UNSUPPORTED features
that the MacApp team is working with.
The qExperimentalAndUnsupported flag is used to condition features that are
experimental and unsupported. Features enabled with this flag may or may not be
included in future versions of MacApp and are here for informational purposes
only.
æKY qInspector
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the MacApp Inspector is used in the application.
æKY qMacApp
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the MacApp libraries are included in the application.
æKY qNames
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that procedure and function names are to be embedded in compiled
code for use in debugging.
æKY qNeedsColorQD
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires Color QuickDraw.
æKY qNeedsFPU
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires a floating-point coprocessor.
æKY qNeedsHierarchicalMenus
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires hierarchical menu support from the
Macintosh® Toolbox.
æKY qNeedsMC68020
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires the Motorola MC68020
microprocessor.
æKY qNeedsMC68030
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires the Motorola MC68030
microprocessor.
æKY qNeedsROM128K
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC Set to TRUE if the application requires a Macintosh computer that uses a 128K
ROM (version $75) or a newer ROM. (The 128K ROM is used in the Macintosh 512K
enhanced computer and later Macintosh models.)
æKY qNeedsScriptManager
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires the Script Manager.
æKY qNeedsStyleTextEdit
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires styled TextEdit.
æKY qNeedsWaitNextEvent
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires the use of the Toolbox routine
WaitNextEvent.
æKY qPerform
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application uses the performance-monitoring features in
MacApp.
æKY qRangeCheck
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application requires range checking on array bounds.
æKY qTemplateViews
æD TRUE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application uses templates for constructing views.
æKY qTrace
æD FALSE
æFi UMacAppUtilities
æT VARIABLE
æC TRUE indicates that the application uses the MacApp debugger’s tracing
functions.
æKY Methods
æKL
TAboutAppCommand.DoIt
TAboutAppCommand.Fields
TAboutAppCommand.IAboutAppCommand
TApplication.AbandonUndoClipboard
TApplication.AboutToLoseControl
TApplication.AbsorbScrapStuff
TApplication.ActivateBusyCursor
TApplication.AddDocument
TApplication.AddFreeWindow
TApplication.AlreadyOpen
TApplication.Beep
TApplication.CanOpenDocument
TApplication.CheckDeskScrap
TApplication.ChooseDocument
TApplication.ClaimClipboard
TApplication.Close
TApplication.CloseWmgrWindow
TApplication.CommitLastCommand
TApplication.CountClicks
TApplication.DeleteDocument
TApplication.DeleteFreeWindow
TApplication.DispatchEvent
TApplication.DoCommandKey
TApplication.DoKeyCommand
TApplication.DoMakeDocument
TApplication.DoMenuCommand
TApplication.DoSetupMenus
TApplication.DoShowAboutApp
TApplication.EachFreeWindow
TApplication.Fields
TApplication.ForAllDocumentsDo
TApplication.ForAllWindowsDo
TApplication.GetActiveWindow
TApplication.GetDataToPaste
TApplication.GetEvent
TApplication.GetFrontWindow
TApplication.GetInspectorName
TApplication.GetLastCommand
TApplication.GetNextCommand
TApplication.GetRsrcWindow
TApplication.HandleActivateEvent
TApplication.HandleAlienEvent
TApplication.HandleDiskEvent
TApplication.HandleEvent
TApplication.HandleFinderRequest
TApplication.HandleKeyDownEvent
TApplication.HandleMouseDown
TApplication.HandleMouseUp
TApplication.HandleSystemEvent
TApplication.HandleUpdateEvent
TApplication.IApplication
TApplication.IdentifySoftware
TApplication.Idle
TApplication.InModalMenuState
TApplication.InModalState
TApplication.InstallCohandler
TApplication.InvalidateCursorRgn
TApplication.InvalidateFocus
TApplication.IsDeskAccessory
TApplication.KeyEventToComponents
TApplication.KindOfDocument
TApplication.LaunchClipboard
TApplication.MainEventLoop
TApplication.MakeClipboardWindow
TApplication.MakeViewForAlienClipboard
TApplication.MenuEvent
TApplication.OpenDeskAccessory
TApplication.OpenNew
TApplication.OpenOld
TApplication.PerformCommand
TApplication.PollEvent
TApplication.PostCommand
TApplication.PostHandleEvent
TApplication.PrintDocument
TApplication.ReadFromDeskScrap
TApplication.RegainControl
TApplication.ReportEvent
TApplication.Run
TApplication.SelectWMgrWindow
TApplication.SetClipView
TApplication.SetTarget
TApplication.SetUndoText
TApplication.SetupTheMenus
TApplication.SFGetParms
TApplication.ShowError
TApplication.SpaceIsLow
TApplication.SwapClipViews
TApplication.TrackCursor
TApplication.TrackMouse
TApplication.UpdateAllWindows
TApplication.WMgrToWindow
TAssociation.EachEntryDo
TAssociation.EntryWithKey
TAssociation.EntryWithValue
TAssociation.Fields
TAssociation.FirstEntryThat
TAssociation.Free
TAssociation.IAssociation
TAssociation.InsertEntry
TAssociation.KeyAt
TAssociation.RemoveKeyAt
TAssociation.RemoveValueAt
TAssociation.ValueAt
TButton.Fields
TButton.IButton
TButton.IRes
TButton.WRes
TButton.WriteRes
TCellSelectCommand.ComputeAnchorCell
TCellSelectCommand.ComputeNewSelection
TCellSelectCommand.DoIt
TCellSelectCommand.Fields
TCellSelectCommand.Free
TCellSelectCommand.HighlightNewSelection
TCellSelectCommand.ICellSelectCommand
TCellSelectCommand.TrackFeedback
TCellSelectCommand.TrackMouse
TCheckBox.DoChoice
TCheckBox.Fields
TCheckBox.ICheckBox
TCheckBox.IRes
TCheckBox.IsOn
TCheckBox.SetState
TCheckBox.Toggle
TCheckBox.ToggleIf
TCheckBox.WRes
TCheckBox.WriteRes
TClassesByID.Compare
TClassesByID.Fields
TClassesByID.IClassesByID
TClassesByName.Compare
TClassesByName.Fields
TClassesByName.IClassesByName
TClassListView.DrawItem
TClassListView.Fields
TClassListView.IClassListView
TClassListView.IRes
TClassListView.SelectItem
TCloseWindowCommand.DoIt
TCloseWindowCommand.Fields
TCloseWindowCommand.ICloseWindowCommand
TCluster.DoChoice
TCluster.Draw
TCluster.Fields
TCluster.Free
TCluster.GetLabel
TCluster.ICluster
TCluster.IRes
TCluster.ReleaseLabel
TCluster.ReportCurrent
TCluster.SetLabel
TCluster.WRes
TCluster.WriteRes
TColumnSelectCommand.ComputeAnchorCell
TColumnSelectCommand.ComputeNewSelection
TColumnSelectCommand.Fields
TColumnSelectCommand.IColumnSelectCommand
TCommand.AutoScroll
TCommand.Commit
TCommand.DoIt
TCommand.Fields
TCommand.ICommand
TCommand.IsDoneTracking
TCommand.IsReadyToExecute
TCommand.RedoIt
TCommand.TrackConstrain
TCommand.TrackFeedback
TCommand.TrackMouse
TCommand.UndoIt
TCommandList.Compare
TCommandList.Fields
TCommandList.ICommandList
TCommandList.Insert
TControl.ComputeSize
TControl.ContainsMouse
TControl.ControlArea
TControl.Dim
TControl.DimState
TControl.DoMouseCommand
TControl.Draw
TControl.Fields
TControl.Flash
TControl.Focus
TControl.Hilite
TControl.HiliteState
TControl.IControl
TControl.Inset
TControl.InstallColor
TControl.InstallTextStyle
TControl.IRes
TControl.IsDimmed
TControl.Resize
TControl.SetInset
TControl.TrackFeedback
TControl.TrackMouse
TControl.Validate
TControl.WRes
TControl.WriteRes
TControlTracker.Fields
TControlTracker.IControlTracker
TCtlMgr.BeInPort
TCtlMgr.CreateCMgrControl
TCtlMgr.DimState
TCtlMgr.DoMouseCommand
TCtlMgr.Draw
TCtlMgr.Fields
TCtlMgr.Free
TCtlMgr.GetLongMax
TCtlMgr.GetLongMin
TCtlMgr.GetLongVal
TCtlMgr.GetMax
TCtlMgr.GetMin
TCtlMgr.GetText
TCtlMgr.GetVal
TCtlMgr.HiliteState
TCtlMgr.ICtlMgr
TCtlMgr.IRes
TCtlMgr.IsCMgrVisible
TCtlMgr.Resize
TCtlMgr.SetCMgrVisibility
TCtlMgr.SetLongMax
TCtlMgr.SetLongMin
TCtlMgr.SetLongVal
TCtlMgr.SetLongValues
TCtlMgr.SetMax
TCtlMgr.SetMin
TCtlMgr.SetText
TCtlMgr.SetVal
TCtlMgr.SetValues
TCtlMgr.WhileFocused
TCtlMgr.WriteRes
TDebugApplication.DoMenuCommand
TDebugApplication.HandleAlienEvent
TDebugApplication.HandleEvent
TDebugApplication.HandleKeyDownEvent
TDebugApplication.HandleMouseDown
TDebugApplication.HandleSystemEvent
TDebugApplication.HandleUpdateEvent
TDebugApplication.IDebugApplication
TDebugApplication.MenuEvent
TDebugApplication.PollEvent
TDebugApplication.PostHandleEvent
TDebugApplication.WMgrToWindow
TDebugCommand.DoIt
TDebugCommand.Fields
TDebugCommand.IDebugCommand
TDeskScrapView.CalcMinSize
TDeskScrapView.CheckScrapContents
TDeskScrapView.Draw
TDeskScrapView.Fields
TDeskScrapView.Free
TDeskScrapView.GetInspectorName
TDeskScrapView.IDeskScrapView
TDeskScrapView.IRes
TDeskScrapView.SuperViewChangedSize
TDeskScrapView.WriteToDeskScrap
TDialogTEView.ComputeSize
TDialogTEView.Fields
TDialogTEView.Free
TDialogTEView.IDialogTEView
TDialogTEView.InstallEditText
TDialogTEView.InstallSelection
TDialogTEView.IRes
TDialogView.CanDismiss
TDialogView.CantDeselect
TDialogView.Close
TDialogView.DeselectCurrentEditText
TDialogView.DismissDialog
TDialogView.DoChoice
TDialogView.DoCommandKey
TDialogView.DoKeyCommand
TDialogView.DoOpen
TDialogView.DoSelectEditText
TDialogView.EachEditText
TDialogView.Fields
TDialogView.Free
TDialogView.GetDialogView
TDialogView.IDialogView
TDialogView.IRes
TDialogView.MakeTEView
TDialogView.Open
TDialogView.ParamTxt
TDialogView.PoseModally
TDialogView.ReplaceText
TDialogView.SelectEditText
TDialogView.SurveyEditText
TDialogView.Tab
TDialogView.WRes
TDialogView.WriteRes
TDocument.Abandon
TDocument.AboutToSave
TDocument.AddView
TDocument.AddWindow
TDocument.CheckDiskFile
TDocument.Close
TDocument.CloseView
TDocument.DeleteView
TDocument.DeleteWindow
TDocument.DiskFileChanged
TDocument.DoInitialState
TDocument.DoMakeViews
TDocument.DoMakeWindows
TDocument.DoMenuCommand
TDocument.DoNeedDiskSpace
TDocument.DoRead
TDocument.DoSetupMenus
TDocument.DoWrite
TDocument.Fields
TDocument.ForAllViewsDo
TDocument.ForAllWindowsDo
TDocument.Free
TDocument.FreeData
TDocument.FreeFile
TDocument.FreeFromClipboard
TDocument.GetChangeCount
TDocument.GetInspectorName
TDocument.GetSaveInfo
TDocument.GetTempName
TDocument.HandlesPrintingCommands
TDocument.IDocument
TDocument.MakeNewCopy
TDocument.OpenAFile
TDocument.OpenAgain
TDocument.PoseSaveDialog
TDocument.ReadFromFile
TDocument.RequestFileName
TDocument.Revert
TDocument.Save
TDocument.SaveAgain
TDocument.SavedOn
TDocument.SaveInPlace
TDocument.SaveViaTemp
TDocument.SetChangeCount
TDocument.SetTitle
TDocument.SFPutParms
TDocument.ShowReverted
TDocument.ShowWindows
TDocument.UntitledName
TDynamicArray.ComputeAddress
TDynamicArray.DeleteElementsAt
TDynamicArray.DynamicFields
TDynamicArray.EachElementDoTil
TDynamicArray.Fields
TDynamicArray.Free
TDynamicArray.GetElementsAt
TDynamicArray.GetSize
TDynamicArray.IDynamicArray
TDynamicArray.InsertElementsBefore
TDynamicArray.IsEmpty
TDynamicArray.Merge
TDynamicArray.ReplaceElementsAt
TDynamicArray.SetArraySize
TEditText.ChangeWrap
TEditText.DoSubstitution
TEditText.Draw
TEditText.Fields
TEditText.Free
TEditText.GetText
TEditText.HandleMouseDown
TEditText.IEditText
TEditText.ImageText
TEditText.InstallSelection
TEditText.IRes
TEditText.RestartEdit
TEditText.SetJustification
TEditText.SetSelection
TEditText.SetText
TEditText.StartEdit
TEditText.StopEdit
TEditText.Validate
TEditText.WRes
TEditText.WriteRes
TEntriesList.Compare
TEntriesList.Fields
TEntriesList.IEntriesList
TEntry.Fields
TEntry.Free
TEntry.IEntry
TEntry.SetValue
TEvtHandler.AddHandler
TEvtHandler.CommitLastCommand
TEvtHandler.CreateAView
TEvtHandler.DoChoice
TEvtHandler.DoCommandKey
TEvtHandler.DoCreateViews
TEvtHandler.DoHandleEvent
TEvtHandler.DoHelp
TEvtHandler.DoIdle
TEvtHandler.DoKeyCommand
TEvtHandler.DoMenuCommand
TEvtHandler.DoMultiClick
TEvtHandler.DoSetupMenus
TEvtHandler.EachHandler
TEvtHandler.Fields
TEvtHandler.FirstHandlerThat
TEvtHandler.Free
TEvtHandler.GetLastCommand
TEvtHandler.GetNextCommand
TEvtHandler.HandlesPrintingCommands
TEvtHandler.IdentifySoftware
TEvtHandler.IEvtHandler
TEvtHandler.InstallSelection
TEvtHandler.KeyEventToComponents
TEvtHandler.LookupSymbol
TEvtHandler.PerformCommand
TEvtHandler.PostCommand
TEvtHandler.RemoveHandler
TEvtHandler.SetIdleFreq
TEvtHandler.Terminate
TGridView.AdornCol
TGridView.AdornRow
TGridView.AllCellsDo
TGridView.CalcMinSize
TGridView.CanSelectCell
TGridView.CellsToPixels
TGridView.CellToVRect
TGridView.ColToVRect
TGridView.DelColAt
TGridView.DelColFirst
TGridView.DelColLast
TGridView.DelRowAt
TGridView.DelRowFirst
TGridView.DelRowLast
TGridView.DoHighlightSelection
TGridView.DoMouseCommand
TGridView.Draw
TGridView.DrawCell
TGridView.DrawRangeOfCells
TGridView.EachCellDo
TGridView.EachInRgn
TGridView.EachSelectedCellDo
TGridView.Fields
TGridView.FirstSelectedCell
TGridView.Free
TGridView.GetColWidth
TGridView.GetRowHeight
TGridView.HighlightCells
TGridView.IdentifyPoint
TGridView.IGridView
TGridView.InsColBefore
TGridView.InsColFirst
TGridView.InsColLast
TGridView.InsRowBefore
TGridView.InsRowFirst
TGridView.InsRowLast
TGridView.InvalidateCell
TGridView.InvalidateSelection
TGridView.IRes
TGridView.IsCellSelected
TGridView.LastSelectedCell
TGridView.RowToVRect
TGridView.ScrollSelectionIntoView
TGridView.SelectCell
TGridView.SetColWidth
TGridView.SetEmptySelection
TGridView.SetRowHeight
TGridView.SetSelection
TGridView.SetSelectionRect
TGridView.SetSingleSelection
TGridView.VPointToCell
TGridView.VPointToLastCell
TGridView.WRes
TGridView.WriteRes
TIcon.Draw
TIcon.Fields
TIcon.Free
TIcon.IIcon
TIcon.IRes
TIcon.ReleaseIcon
TIcon.SetIcon
TIcon.WRes
TIcon.WriteRes
TInspector.AddObject
TInspector.AddObjectList
TInspector.DoSetupMenus
TInspector.Fields
TInspector.Free
TInspector.GetObjectList
TInspector.IInspector
TInspector.MakeWindow
TInspector.RemoveObject
TInspectorCommand.DoIt
TInspectorCommand.Fields
TInspectorCommand.IInspectorCommand
TInspectWindow.CloseByUser
TInspectWindow.Draw
TInspectWindow.Fields
TInspectWindow.IInspectWindow
TInspectWindow.InsertClass
TInspectWindow.IRes
TInspectWindow.Resize
TInspectWindow.SelectObject
TInspectWindow.SetNumberOfClasses
TInspectWindow.SetTitleForDoc
TList.At
TList.AtDelete
TList.AtPut
TList.Delete
TList.DeleteAll
TList.DynamicFields
TList.Each
TList.Fields
TList.First
TList.FirstThat
TList.FreeAll
TList.FreeList
TList.GetEqualItemNo
TList.GetInspectorName
TList.GetSameItemNo
TList.IList
TList.Insert
TList.InsertBefore
TList.InsertFirst
TList.InsertLast
TList.IterateTil
TList.Last
TList.LastThat
TList.Pop
TList.Push
TList.SetEltType
TList.SetEltTypeID
TList.SortBy
TListView.CalcMinSize
TListView.ChangeSelection
TListView.DeleteItem
TListView.DoHighlightSelection
TListView.DoMouseCommand
TListView.Draw
TListView.DrawItem
TListView.Fields
TListView.IListView
TListView.InsertItem
TListView.IRes
TListView.ItemToVRect
TListView.RevealItem
TListView.SelectItem
TListView.SetNumberOfItems
TListView.SetPen
TListView.SetStyle
TListView.VPointToItem
TNewDocCommand.DoIt
TNewDocCommand.Fields
TNewDocCommand.INewDocCommand
TNoChangesCommand.Fields
TNoChangesCommand.INoChangesCommand
TNumberText.Fields
TNumberText.GetValue
TNumberText.INumberText
TNumberText.IRes
TNumberText.SetValue
TNumberText.Validate
TNumberText.WRes
TNumberText.WriteRes
TObject.Clone
TObject.DynamicFields
TObject.Fields
TObject.ForAllSubClassesDo
TObject.ForAllSuperClassesDo
TObject.Free
TObject.GetClass
TObject.GetClassName
TObject.GetClassSize
TObject.GetDynamicPtr
TObject.GetDynamicSize
TObject.GetInspectorName
TObject.GetInstanceSize
TObject.GetSuperClass
TObject.Initialize
TObject.Inspect
TObject.IObject
TObject.IsMemberClass
TObject.IsSameClass
TObject.Lock
TObject.SetDynamicSize
TObject.SetInstanceSize
TObject.ShallowClone
TObject.ShallowFree
TObjectList.AddObject
TObjectList.Fields
TObjectList.IObjectList
TObjectList.RemoveObject
TObjectView.ChangeSelection
TObjectView.DoMouseCommand
TObjectView.Draw
TObjectView.Fields
TObjectView.FirstFieldThat
TObjectView.InspectControlHandle
TObjectView.InspectGrafPtr
TObjectView.InspectHandle
TObjectView.InspectRgnHandle
TObjectView.InspectTEHandle
TObjectView.InspectWindowPtr
TObjectView.InstallObject
TObjectView.IObjectView
TObjectView.IRes
TObjectView.LockObject
TObjectView.Resize
TObjectView.SelectField
TObjectView.SuperViewChangedSize
TObjectView.UnlockObject
TObjListView.DrawItem
TObjListView.Fields
TObjListView.InstallObjectList
TObjListView.IObjListView
TObjListView.IRes
TObjListView.SelectItem
TOldDocCommand.DoIt
TOldDocCommand.Fields
TOldDocCommand.IOldDocCommand
TPattern.Draw
TPattern.Fields
TPattern.Free
TPattern.IPattern
TPattern.IRes
TPattern.ReleasePattern
TPattern.SetPattern
TPattern.WRes
TPattern.WriteRes
TPicture.Draw
TPicture.Fields
TPicture.Free
TPicture.IPicture
TPicture.IRes
TPicture.ReleasePicture
TPicture.SetPicture
TPicture.WRes
TPicture.WriteRes
TPopup.AdjustBotRight
TPopup.CalcLabelRect
TPopup.CalcMenuRect
TPopup.DoMouseCommand
TPopup.Draw
TPopup.DrawLabel
TPopup.DrawPopupBox
TPopup.Fields
TPopup.Free
TPopup.GetCurrentItem
TPopup.GetItemText
TPopup.IPopup
TPopup.IRes
TPopup.ReleasePopup
TPopup.SetCurrentItem
TPopup.SetPopup
TPopup.WRes
TPopup.WriteRes
TPrintCommand.DoIt
TPrintCommand.Fields
TPrintCommand.IPrintCommand
TPrintHandler.BreakFollowing
TPrintHandler.CalcPageStrips
TPrintHandler.CalcViewPerPage
TPrintHandler.CheckPrinter
TPrintHandler.DrawPageBreak
TPrintHandler.DrawPrintFeedback
TPrintHandler.Fields
TPrintHandler.FocusOnInterior
TPrintHandler.GetInspectorName
TPrintHandler.IPrintHandler
TPrintHandler.LocatePageInterior
TPrintHandler.MaxPageNumber
TPrintHandler.Print
TPrintHandler.PrinterChanged
TPrintHandler.RedoPageBreaks
TPrintHandler.Reset
TPrintHandler.SetDefaultPrintInfo
TPrintHandler.SetPageInterior
TPrintHandler.SetPageOffset
TPrintHandler.SetupForFinder
TPrintStyleChangeCommand.DoIt
TPrintStyleChangeCommand.Fields
TPrintStyleChangeCommand.Free
TPrintStyleChangeCommand.IPrintStyleChangeCommand
TPrintStyleChangeCommand.RedoIt
TPrintStyleChangeCommand.UndoIt
TPtrBasedDoublyLinkedList.AppendNode
TPtrBasedDoublyLinkedList.EachNodeDo
TPtrBasedDoublyLinkedList.Fields
TPtrBasedDoublyLinkedList.IPtrBasedDoublyLinkedList
TPtrBasedDoublyLinkedList.RemoveNode
TQuitCommand.DoIt
TQuitCommand.Fields
TQuitCommand.IQuitCommand
TRadio.DoChoice
TRadio.Fields
TRadio.IRadio
TRadio.IRes
TRadio.IsOn
TRadio.SetState
TRadio.Toggle
TRadio.ToggleIf
TRadio.WRes
TRadio.WriteRes
TRCSelectCommand.ComputeNewSelection
TRCSelectCommand.Fields
TRCSelectCommand.TrackMouse
TRevertDocCommand.DoIt
TRevertDocCommand.Fields
TRevertDocCommand.IRevertDocCommand
TRowSelectCommand.ComputeAnchorCell
TRowSelectCommand.ComputeNewSelection
TRowSelectCommand.Fields
TRowSelectCommand.IRowSelectCommand
TRunArray.DeleteItems
TRunArray.Fields
TRunArray.FindChunk
TRunArray.FindItem
TRunArray.Free
TRunArray.GetValue
TRunArray.InsertItems
TRunArray.IRunArray
TRunArray.SumValues
TSaveDocCommand.DoIt
TSaveDocCommand.Fields
TSaveDocCommand.ISaveDocCommand
TScrollBar.ActionProc
TScrollBar.DeltaValue
TScrollBar.DoMouseCommand
TScrollBar.Fields
TScrollBar.IRes
TScrollBar.IScrollBar
TScrollBar.TrackScrollBar
TScrollBar.WRes
TScrollBar.WriteRes
TScroller.AddSubview
TScroller.AdjustScrollBars
TScroller.AutoScroll
TScroller.CreateScrollBar
TScroller.CreateTemplateScrollBar
TScroller.DoKeyCommand
TScroller.DoScroll
TScroller.Fields
TScroller.Focus
TScroller.ForceRedraw
TScroller.Free
TScroller.GetExtent
TScroller.GetScroller
TScroller.HaveScrollBar
TScroller.IRes
TScroller.IScroller
TScroller.LocalToSuper
TScroller.Locate
TScroller.RemoveSubview
TScroller.Resize
TScroller.RevealRect
TScroller.ScrollBy
TScroller.ScrollDraw
TScroller.ScrollRelative
TScroller.ScrollStep
TScroller.ScrollTo
TScroller.SetScrollLimits
TScroller.SetScrollParameters
TScroller.SubViewChangedSize
TScroller.SuperToLocal
TScroller.WRes
TScroller.WriteRes
TSortedList.Compare
TSortedList.DoSearch
TSortedList.Fields
TSortedList.GetEqualItemNo
TSortedList.Insert
TSortedList.ISortedList
TSortedList.Search
TSortedList.Sort
TSScrollBar.Activate
TSScrollBar.AttachScroller
TSScrollBar.BeInPort
TSScrollBar.DoMouseCommand
TSScrollBar.Draw
TSScrollBar.Fields
TSScrollBar.Free
TSScrollBar.IRes
TSScrollBar.ISScrollBar
TSScrollBar.TrackScrollBar
TSScrollBar.WriteRes
TStaticText.ChangeWrap
TStaticText.DoSubstitution
TStaticText.Draw
TStaticText.Fields
TStaticText.Free
TStaticText.GetText
TStaticText.ImageText
TStaticText.IRes
TStaticText.IStaticText
TStaticText.ReleaseText
TStaticText.SetJustification
TStaticText.SetText
TStaticText.WRes
TStaticText.WriteRes
TStdPrintHandler.AdornPage
TStdPrintHandler.BanishPrintDialog
TStdPrintHandler.BreakFollowing
TStdPrintHandler.CalcPageStrips
TStdPrintHandler.CalcViewPerPage
TStdPrintHandler.CheckPrinter
TStdPrintHandler.ChkPrintErr
TStdPrintHandler.ChooseSpoolFile
TStdPrintHandler.ClosePrintShop
TStdPrintHandler.DoInMacPrint
TStdPrintHandler.DoMenuCommand
TStdPrintHandler.DoPrintIdling
TStdPrintHandler.DoSetupMenus
TStdPrintHandler.DrawPageBreak
TStdPrintHandler.DrawPageInterior
TStdPrintHandler.DrawPrintFeedback
TStdPrintHandler.EachBreak
TStdPrintHandler.Fields
TStdPrintHandler.FocusOnBorder
TStdPrintHandler.FocusOnInterior
TStdPrintHandler.Free
TStdPrintHandler.GetBreakCoord
TStdPrintHandler.GetDocName
TStdPrintHandler.GetDriverName
TStdPrintHandler.IdentifySoftware
TStdPrintHandler.InstallMargins
TStdPrintHandler.InvalPageFeedback
TStdPrintHandler.IStdPrintHandler
TStdPrintHandler.LocatePageInterior
TStdPrintHandler.MaxPageNumber
TStdPrintHandler.OneSubJob
TStdPrintHandler.OpenPrintShop
TStdPrintHandler.PageToStrip
TStdPrintHandler.PointToPageStrip
TStdPrintHandler.PoseJobDialog
TStdPrintHandler.PosePageSetupDialog
TStdPrintHandler.PosePrintDialog
TStdPrintHandler.Print
TStdPrintHandler.PrinterChanged
TStdPrintHandler.PrintPage
TStdPrintHandler.PrintSpoolFile
TStdPrintHandler.RedoPageBreaks
TStdPrintHandler.Reset
TStdPrintHandler.SetDefaultPrintInfo
TStdPrintHandler.SetMargins
TStdPrintHandler.SetPage
TStdPrintHandler.SetPageInterior
TStdPrintHandler.SetPageOffset
TStdPrintHandler.SetPrintExtent
TStdPrintHandler.SetupForFinder
TStdPrintHandler.SetupPrintOne
TStdPrintHandler.ShowDocBeingPrinted
TStdPrintHandler.ShowsOnScreen
TStdPrintHandler.StripToPage
TStdPrintHandler.ValidatePrintRecord
TTECommand.BanishOldText
TTECommand.DoIt
TTECommand.DoMainFunction
TTECommand.Fields
TTECommand.Free
TTECommand.InstallNewText
TTECommand.ITECommand
TTECommand.RedoIt
TTECommand.RemoveAdditions
TTECommand.RestoreSelection
TTECommand.ReviveDeletions
TTECommand.UndoIt
TTECutCopyCommand.DoIt
TTECutCopyCommand.Fields
TTECutCopyCommand.Free
TTECutCopyCommand.ITECutCopyCommand
TTECutCopyCommand.ReviveDeletions
TTEPasteCommand.Fields
TTEPasteCommand.ITEPasteCommand
TTEStyleCommand.DoIt
TTEStyleCommand.Fields
TTEStyleCommand.InstallManyStyles
TTEStyleCommand.InstallOneStyle
TTEStyleCommand.ITEStyleCommand
TTEStyleCommand.RedoIt
TTEStyleCommand.UndoIt
TTETypingCommand.AddCharacter
TTETypingCommand.BkSpcLeft
TTETypingCommand.BkSpcRight
TTETypingCommand.CompleteTyping
TTETypingCommand.DoIt
TTETypingCommand.DoNormalChar
TTETypingCommand.Fields
TTETypingCommand.Free
TTETypingCommand.FwdDelete
TTETypingCommand.ITETypingCommand
TTETypingCommand.RedoIt
TTETypingCommand.UndoIt
TTEView.AutoScrolling
TTEView.BeInPort
TTEView.BeInScroller
TTEView.CalcMinSize
TTEView.CalcRealHeight
TTEView.CalcRealWidth
TTEView.CalcSelLoc
TTEView.ChangeWrap
TTEView.ClikLoop
TTEView.ComputeSize
TTEView.ContainsClipType
TTEView.ContinuousStyle
TTEView.DoBreakFollowing
TTEView.DoCalcViewPerPage
TTEView.DoIdle
TTEView.DoKeyCommand
TTEView.DoMakeEditCommand
TTEView.DoMakeStyleCommand
TTEView.DoMakeTypingCommand
TTEView.DoMenuCommand
TTEView.DoMouseCommand
TTEView.DoneTyping
TTEView.DoSetCursor
TTEView.DoSetPageOffset
TTEView.DoSetupMenus
TTEView.Draw
TTEView.ExtractStyles
TTEView.ExtractText
TTEView.Fields
TTEView.Free
TTEView.GetPrintExtent
TTEView.GivePasteData
TTEView.IdentifySoftware
TTEView.InstallSelection
TTEView.IRes
TTEView.ITEView
TTEView.MakeTERecord
TTEView.RecalcText
TTEView.Resize
TTEView.ScrollSelectionIntoView
TTEView.SetJustification
TTEView.SetOneStyle
TTEView.SetText
TTEView.ShowReverted
TTEView.SpaceForStyles
TTEView.StuffStyles
TTEView.StuffTERects
TTEView.StuffText
TTEView.SynchView
TTEView.ViewEnable
TTEView.WRes
TTEView.WriteRes
TTEView.WriteToDeskScrap
TTextGridView.DrawCell
TTextGridView.Fields
TTextGridView.Focus
TTextGridView.GetText
TTextGridView.IRes
TTextGridView.ITextGridView
TTextGridView.SetPen
TTextGridView.SetUpFont
TTextGridView.WRes
TTextGridView.WriteRes
TTextListView.AllItemsDo
TTextListView.CanSelectCell
TTextListView.CanSelectItem
TTextListView.DelItemAt
TTextListView.DelItemFirst
TTextListView.DelItemLast
TTextListView.EachItemDo
TTextListView.EachSelectedItemDo
TTextListView.Fields
TTextListView.FirstSelectedItem
TTextListView.GetItemHeight
TTextListView.GetItemText
TTextListView.GetItemWidth
TTextListView.GetText
TTextListView.InsItemBefore
TTextListView.InsItemFirst
TTextListView.InsItemLast
TTextListView.InvalidateItem
TTextListView.IsItemSelected
TTextListView.ITextListView
TTextListView.LastSelectedItem
TTextListView.Resize
TTextListView.SelectCell
TTextListView.SelectItem
TTextListView.SetItemHeight
TTextListView.SetItemWidth
TTextListView.WriteRes
TTranscriptView.AddText
TTranscriptView.AddTextToFile
TTranscriptView.CommonInit
TTranscriptView.DoHelp
TTranscriptView.DoIdle
TTranscriptView.DoKeyCommand
TTranscriptView.Draw
TTranscriptView.EndForce
TTranscriptView.Fields
TTranscriptView.ForceOutput
TTranscriptView.Free
TTranscriptView.GetInsertionPointRect
TTranscriptView.HandleMouseDown
TTranscriptView.IndexColToLocal
TTranscriptView.IndexToLocal
TTranscriptView.IndexToRow
TTranscriptView.InstallTextStyle
TTranscriptView.IRes
TTranscriptView.ITranscriptView
TTranscriptView.LocalToCol
TTranscriptView.LocalToIndex
TTranscriptView.PrevIndex
TTranscriptView.Redirect
TTranscriptView.RevealInsertionPoint
TTranscriptView.RevealInsertionPointLine
TTranscriptView.RowToIndex
TTranscriptView.Scroll
TTranscriptView.SuccIndex
TUndoRedoCommand.DoIt
TUndoRedoCommand.Fields
TUndoRedoCommand.IUndoRedoCommand
TView.Activate
TView.AddSubView
TView.AdjustSize
TView.Adorn
TView.AssumeFocused
TView.AttachPrintHandler
TView.BeInPort
TView.BeInScroller
TView.CalcMinSize
TView.ClipFurtherTo
TView.Close
TView.ComputeSize
TView.ContainsClipType
TView.ContainsMouse
TView.CountSubViews
TView.DoBreakFollowing
TView.DoCalcPageStrips
TView.DoCalcViewPerPage
TView.DoCheckPrinter
TView.DoChoice
TView.DoDrawPageBreak
TView.DoDrawPrintFeedback
TView.DoHighlightSelection
TView.DoMenuCommand
TView.DoMouseCommand
TView.DoOffScreen
TView.DoPagination
TView.DoPrinterChanged
TView.DoSetCursor
TView.DoSetPageOffset
TView.DoSetupMenus
TView.Draw
TView.DrawContents
TView.EachSubView
TView.Fields
TView.FindSubView
TView.FirstSubviewThat
TView.Focus
TView.FocusOnSuperView
TView.ForceRedraw
TView.Free
TView.FreeFromClipboard
TView.GetDefaultCursorRgn
TView.GetDialogView
TView.GetExtent
TView.GetFrame
TView.GetGrafPort
TView.GetInspectorName
TView.GetPrintExtent
TView.GetQDExtent
TView.GetScroller
TView.GetVisibleRect
TView.GetWindow
TView.GivePasteData
TView.HandleCursor
TView.HandleMouseDown
TView.HasPendingUpdate
TView.InvalidateFocus
TView.InvalidRect
TView.InvalidVRect
TView.IRes
TView.IsDoneTracking
TView.IsFocused
TView.IsShown
TView.IsViewEnabled
TView.IsVisible
TView.IView
TView.LastSubViewThat
TView.LocalToSuper
TView.LocalToWindow
TView.Locate
TView.MakeFirstSubView
TView.MakeLastSubView
TView.Open
TView.PageInteriorChanged
TView.QDToViewPt
TView.QDToViewRect
TView.RemoveSubView
TView.Resize
TView.RevealBottom
TView.RevealRect
TView.RevealTop
TView.Show
TView.ShowReverted
TView.SubViewChangedSize
TView.SubViewMoved
TView.SuperToLocal
TView.SuperViewChangedSize
TView.SuperViewMoved
TView.TrackConstrain
TView.TrackFeedback
TView.TrackMouse
TView.Update
TView.ValidVRect
TView.ViewEnable
TView.ViewToQDPt
TView.ViewToQDRect
TView.WindowToLocal
TView.WRes
TView.WriteRes
TView.WriteToDeskScrap
TWindow.Activate
TWindow.AdaptToScreen
TWindow.AllowsMenuAccess
TWindow.BuildWindowRgns
TWindow.Center
TWindow.Close
TWindow.CloseByUser
TWindow.DoMenuCommand
TWindow.DoSetupMenus
TWindow.DrawContents
TWindow.DrawResizeIcon
TWindow.Fields
TWindow.Focus
TWindow.FocusOnSuperView
TWindow.ForceOnScreen
TWindow.Free
TWindow.GetGlobalBounds
TWindow.GetGrafPort
TWindow.GetInspectorName
TWindow.GetMaxIntersectedDevice
TWindow.GetTitle
TWindow.GetWindow
TWindow.GoAwayByUser
TWindow.HandleMouseDown
TWindow.HasPendingUpdate
TWindow.InstallDocument
TWindow.IRes
TWindow.IsDraggable
TWindow.IsShown
TWindow.IWindow
TWindow.Locate
TWindow.MoveByUser
TWindow.Open
TWindow.Resize
TWindow.ResizeByUser
TWindow.Select
TWindow.SetResizeLimits
TWindow.SetTarget
TWindow.SetTitle
TWindow.SetTitleForDoc
TWindow.Show
TWindow.SimpleStagger
TWindow.Update
TWindow.WRes
TWindow.WriteRes
TWindow.Zoom
TWindow.ZoomByUser
æKY TAboutAppCommand.DoIt
æD PROCEDURE TAboutAppCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt displays the About box. MacApp calls this method to execute the
TAboutAppCommand command created when the user chooses the About Application item
from the Apple menu. You never need to call the DoIt method yourself.
æKY TAboutAppCommand.Fields
æD PROCEDURE TAboutAppCommand.Fields
(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TAboutAppCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TAboutAppCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TAboutAppCommand.IAboutAppCommand
æD PROCEDURE TAboutAppCommand.IAboutAppCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IAboutAppCommand initializes a TAboutAppCommand object and associates it with a
command number. The itsCmdNumber parameter is the command number that is
associated with a particular command—in this case, the command that displays the
About box. The command number is used in the 'cmnu' resource in the resource
description file; you will typically define a constant to represent that number in
both the resource description file and in the appropriate interface or
implementation file of the application. MacApp calls this method when the user chooses
the About item from the Apple menu. You never need to call IAboutAppCommand yourself.
æKY TApplication.AbandonUndoClipboard
æD PROCEDURE TApplication.AbandonUndoClipboard;
æFi UMacApp.p
æT METHOD
æC AbandonUndoClipboard frees the “Undo Clipboard”—the object that stores material
needed to undo a user action. This method calls gClipUndoView.FreeFromClipboard
and sets gClipUndoView to NIL. MacApp calls AbandonUndoClipboard when the Undo
Clipboard is no longer needed; for example, when a command is committed or
when the application must claim the Clipboard to carry out a Cut or Copy command.
You usually do not need to call AbandonUndoClipboard yourself.
æKY TApplication.AboutToLoseControl
æD PROCEDURE TApplication.AboutToLoseControl(convertClipboard: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC AboutToLoseControl cleans up for an application when control is about to pass to
another application or a desk accessory. If the value of the convertClipboard
parameter is TRUE and the last command changed the Clipboard, then this method
commits the last command and writes the contents of the Clipboard to the desk
scrap. Otherwise, the contents of the Clipboard are not written to the desk
scrap. MacApp calls AboutToLoseControl when control is about to pass to another
application or to a desk accessory. You usually do not need to call this method
yourself.
æKY TApplication.AbsorbScrapStuff
æD PROCEDURE TApplication.AbsorbScrapStuff;
æFi UMacApp.p
æT METHOD
æC AbsorbScrapStuff retrieves the current InfoScrap record from low memory; this
record is later used to determine if the scrap has changed. MacApp calls
AbsorbScrapStuff when it needs to check the state of the public desk scrap—for
example, when launching the Clipboard or handing over control to another application
in the MultiFinder® environment. You usually do not need to call AbsorbScrapStuff
yourself. If you must call this method, do so infrequently and with caution,
because MacApp uses this method to maintain the "previous" and "current" state
of the desk scrap. Calling AbsorbScrapStuff yourself may cause MacApp to fail to
recognize that the desk scrap has changed.
æKY TApplication.ActivateBusyCursor
æD PROCEDURE TApplication.ActivateBusyCursor(entering: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC ActivateBusyCursor changes the cursor to the standard watch cursor or back to
its previous state. When the value of the entering parameter is TRUE, this method
changes the cursor to the wristwatch; when the value of the entering parameter
is FALSE, the cursor is restored to its usual state, the arrow. MacApp calls
ActivateBusyCursor when the application’s functions are temporarily unavailable
to the user—for example, during a context switch under MultiFinder, or during
the completion of a system request. You can call this method to indicate to the
user that a lengthy operation is in progress, or that user requests will
temporarily be ignored for some other reason.
æKY TApplication.AddDocument
æD PROCEDURE TApplication.AddDocument(aNewDocument: TDocument);
æFi UMacApp.p
æT METHOD
æC AddDocument adds the specified document to the application's list of documents.
The aNewDocument parameter is the TDocument object to be added to the list.
MacApp calls this method when creating new documents or opening existing ones. You
usually do not need to call AddDocument yourself.
æKY TApplication.AddFreeWindow
æD PROCEDURE TApplication.AddFreeWindow(aWindow: TWindow);
æFi UMacApp.p
æT METHOD
æC AddFreeWindow adds the TWindow object to the application's free-window list. (A
“free window” is one that is not associated with a document.) The aWindow
parameter specifies the window to be added to the list. If necessary, MacApp calls
this method from TWindow.InstallDocument when initializing new TWindow objects;
you usually do not need to call AddFreeWindow yourself.
æKY TApplication.AlreadyOpen
æD FUNCTION TApplication.AlreadyOpen(fileName: Str255; volRefnum: INTEGER): TDocument;
æFi UMacApp.p
æT METHOD
æC AlreadyOpen returns the specified document if that document is already opened;
otherwise, it returns NIL. The fileName parameter specifies the file that MacApp
tests to determine whether it is open. The volRefnum parameter is the file’s
volume reference number. MacApp calls this method to find out if a file is open
already when the user requests or opens that file. You can call this method to
determine if a document object exists that corresponds to a specified filename
and volume; however, you usually do not need to call this method yourself.
æKY TApplication.Beep
æD PROCEDURE TApplication.Beep(duration: INTEGER);
æFi UMacApp.p
æT METHOD
æC Beep produces a system beep. The duration parameter is meaningful only if the
SysBeep Toolbox routine is using the ROM beep. The parameter specifies, in ticks,
how long the beep will sound. MacApp calls this method in a variety of
situations that require the application to alert the user. You can use Beep any time
you wish to play the system beep. Sound Manager users may need to override this
method to integrate its function in their applications.
æKY TApplication.CanOpenDocument
æD FUNCTION TApplication.CanOpenDocument(itsCmdNumber: CmdNumber;
VAR anAppFile: AppFile): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC CanOpenDocument simulates the filtering done by the Standard File dialog box; it
returns TRUE if the document to be opened meets specified criteria. The
itsCmdNumber parameter is the command number of the command that caused
CanOpenDocument to be called. The command number is used in the 'cmnu' resource in the
resource description file; you typically define a constant to represent that number
in both the resource description file and in the appropriate interface or
implementation file of the application. The anAppFile parameter is a record that
stores the document's volume reference number, file type, version number, and
filename. For specific information regarding the AppFile data type, see the
discussion of the GetAppFiles procedure in the “Segment Loader Routines” section of
Inside Macintosh. MacApp calls CanOpenDocument only when opening or printing
documents from the Finder™; when using Standard File to open a document, Standard
File does the filtering. You usually do not need to call this method yourself.
æKY TApplication.CheckDeskScrap
æD PROCEDURE TApplication.CheckDeskScrap;
æFi UMacApp.p
æT METHOD
æC CheckDeskScrap calls AbsorbScrapStuff to compare the current scrap change count
with the previous change count. If the scrap has changed, then the current
Clipboard becomes the “Undo Clipboard,” and MacApp reads the new desk scrap,
placing it in the current Clipboard. MacApp calls CheckDeskScrap in situations when
the desk scrap may have changed since it was last checked—for example, after a
Copy command is executed, after a desk accessory is used, or when the
application is made the active layer in the MultiFinder environment. You can call this
method any time you want to find out whether the desk scrap has changed.
æKY TApplication.ChooseDocument
æD FUNCTION TApplication.ChooseDocument(itsCmdNumber: CmdNumber;
VAR anAppFile: AppFile): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC ChooseDocument calls SFPGetFile and returns TRUE if the user selected a file.
The itsCmdNumber parameter is the command number of the command that caused
ChooseDocument to be called. The command number is used in the 'cmnu' resource in
the resource description file; you typically define a constant to represent that
number in both the resource description file and in the appropriate interface
or implementation file of the application. The anAppFile parameter is a record
that stores the document's volume reference number, file type, version number,
and filename. MacApp calls ChooseDocument when the user chooses a command in the
range cOpen to cOpenLast. You usually do not need to call ChooseDocument
yourself, nor override it, unless you change the way a user can open a document.
æKY TApplication.ClaimClipboard
æD PROCEDURE TApplication.ClaimClipboard(clipView: TView);
æFi UMacApp.p
æT METHOD
æC ClaimClipboard makes clipView the new view displayed by the Clipboard. The
clipView parameter specifies the TView object that is to be installed as the new
Clipboard view. MacApp calls ClaimClipboard when the state of the Clipboard
changes; typically this is the result of executing a Cut or Copy command, creating a
new view for data in the desk scrap, or reading the contents of the Clipboard
for some other reason. MacApp also calls this method to install the standard
Clipboard view (gClipOrphanage) when the application is low on memory. You usually
call ClaimClipboard as part of the implementation of your Cut or Copy commands.
æKY TApplication.Close
æD PROCEDURE TApplication.Close;
æFi UMacApp.p
æT METHOD
æC Close attempts to close all open windows and save all open documents. If all
save operations succeed, the application terminates. If the user cancels, Close
signals failure, with the error parameter equal to noErr and the message
parameter equal to msgCancelled. MacApp calls Close after printing documents from the
Finder™ or when the user chooses the Quit command; you usually do not need to
call this method yourself. You may override Close if you need to take additional
action when the application terminates.
æKY TApplication.CloseWmgrWindow
æD PROCEDURE TApplication.CloseWmgrWindow(aWMgrWindow: WindowPtr);
æFi UMacApp.p
æT METHOD
æC CloseWmgrWindow closes a specified Window Manager window or Desk Accessory. If
the window is the only one associated with a document that has changed, this
method will pose the Save Changes dialog box. If the user confirms, the document
is saved and all windows and subviews associated with it are closed; if the used
denies, the window and its subviews are closed, but changes to the document
are not saved. If the user cancels, this method signals failure with the error
parameter equal to noErr and the message equal to msgCancelled. The TWindow
object, if there is one associated with the document, is also freed when the
document is closed. If there is no TWindow object associated with the document, this
method calls the Toolbox routine HideWindow to make the Window Manager window
invisible. The aWMgrWindow parameter is the pointer to the Window Manager window.
MacApp calls this method when the user quits the application or closes a
window either by choosing a menu item or clicking the window's close box. You can
call this method yourself when you want to close a window in a nonstandard
way—for example, if you know the pointer to the window and simply want to make sure
that the window is closed.
æKY TApplication.CommitLastCommand
æD PROCEDURE TApplication.CommitLastCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC CommitLastCommand calls the Commit method of the last TCommand object created.
This action commits that command, making its action immune to the effects of the
Undo menu item. MacApp calls CommitLastCommand when a pending command will
affect the document in such a way that it will no longer be possible to undo the
last command—for example, before closing the document, saving it to the disk, or
restoring (reverting) the document to its last saved state. You usually do not
need to call this method yourself.
æKY TApplication.CountClicks
æD FUNCTION TApplication.CountClicks(aPDownEvent: EventRecordPtr;
whereMouseDown: INTEGER): INTEGER;
æFi UMacApp.p
æT METHOD
æC CountClicks returns the number of clicks that can be considered multiple clicks.
If a mouse-down event should be treated as a single click, or possibly the
first click of a multiple-click sequence, this method returns 1. If the mouse-down
event should be considered a double-click, this method returns 2; the same
rule is used for triple-clicks and so forth. A click is considered part of a
multiple-click sequence if the mouse-down event was within the allowed time range of
the previous mouse-up event, and was within the allowed range of pixels of the
last mouse-down event. The aPDownEvent parameter is a pointer to the event
record for a mouse-down event. The whereMouseDown parameter is the part code
indicating in which part of the window the mouse click was located.
TApplication.HandleMouseDown uses the the result returned by this function to
determine the number of clicks needed to define multiple clicks . You can use this
method in a similar fashion, although you usually do not need to call this method
yourself unless you implement special behavior based on counting multiple mouse clicks.
æKY TApplication.DeleteDocument
æD PROCEDURE TApplication.DeleteDocument(docToDelete: TDocument);
æFi UMacApp.p
æT METHOD
æC DeleteDocument deletes a document from the TApplication object’s list of
documents. The docToDelete parameter specifies the TDocument object to be deleted from
the application's list of documents. Note that you no longer need to call
TList.RemoveDeletions as in versions of MacApp prior to 2.0 - the document object
is actually removed from the list and the size of TDynamicArray object is
reduced when DeleteDocument is called. MacApp calls DeleteDocument from
TDocument.Free when it is freeing a document object. You never call this method
yourself because you must not delete a document from the list until the document
is freed.
æKY TApplication.DeleteFreeWindow
æD PROCEDURE TApplication.DeleteFreeWindow(windowToDelete: TWindow);
æFi UMacApp.p
æT METHOD
æC DeleteFreeWindow deletes a window from the application's list of free windows. A
free window is one that belongs to the application instead of to a document.
(An example is the palette window in MacPaint.) The windowToDelete parameter is
the TWindow object to be deleted from the free-window list. MacApp calls this
method when freeing a window not associated with a document, and also as a
precautionary measure just before associating a window with a document.
TWindow.InstallDocument calls SELF.DeleteFreeWindow to ensure that the window is not
placed on both the free-window list and the document’s window list at the same time.
You usually do not need to call DeleteFreeWindow yourself.
æKY TApplication.DispatchEvent
æD PROCEDURE TApplication.DispatchEvent(VAR theEventInfo: EventInfo;
VAR commandToPerform: TCommand);
æFi UMacApp.p
æT METHOD
æC DispatchEvent tests each event the user generates and dispatches it to the
appropriate TApplication.Handle<Some>Event method. The parameter theEventInfo is the
event record that holds the event’s data. The commandToPerform parameter
returns a TCommand object to be executed as a result of handling the event, or NIL.
MacApp calls DispatchEvent from TApplication.MainEventLoop. You usually do not
need to call this method yourself.
æKY TApplication.DoCommandKey
æD FUNCTION TApplication.DoCommandKey(ch: Char;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoCommandKey handles keystrokes made with the Command key pressed, returning the
appropriate TCommand object. The ch parameter is the character that
corresponds to the key the user pressed in combination with the Command key. The info
parameter is the event record description of the key-down event that caused MacApp
to call DoKeyCommand; the info parameter is used to pass information about the
event, such as whether the Option key was pressed. MacApp calls DoCommandKey
when a key-down event is received while the Command key is pressed. You usually
do not need to call this method yourself.
æKY TApplication.DoKeyCommand
æD FUNCTION TApplication.DoKeyCommand(ch: CHAR; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoKeyCommand handles keystrokes made without the Command key pressed, returning
the appropriate TCommand object. The ch parameter is the alphanumeric character
that corresponds to the key the user pressed. The aKeyCode parameter is the
ASCII key code generated by the keystroke. The info parameter is the event record
description of the event that caused MacApp to call DoKeyCommand; the info
parameter is used to pass information about the event, such as whether the Option
key was pressed. MacApp calls DoKeyCommand when the user presses a key on the
keyboard. You usually do not need to override this method or call it yourself.
æKY TApplication.DoMakeDocument
æD FUNCTION TApplication.DoMakeDocument(itsCmdNumber: CmdNumber): TDocument;
æFi UMacApp.p
æT METHOD
æC DoMakeDocument creates a TDocument object that represents a document for the
application. The default method creates and initializes a TDocument object that
has a file type of gMainFileType and has a signature of four question marks. That
object uses only the data fork, and doesn't keep that fork open. You must
override DoMakeDocument to create any other kind of document. The itsCmdNumber
parameter specifies which menu item the user selected to create the document.
MacApp defines certain constants for use as command numbers, including the
following: cNew (= 10) and cNewLast (= 19), which define a range of New commands; and
cOpen (= 20) and cOpenLast (= 29), which define a range of Open commands. The
command number is used in the 'cmnu' resource in the resource description file;
you typically define a constant to represent that number in both the resource
description file and in the appropriate interface or implementation file of the
application. MacApp calls DoMakeDocument from such methods as
TApplication.OpenNew, TApplication.OpenOld, and TApplication.PrintDocument. You
usually do not need to call DoMakeDocument yourself.
æKY TApplication.DoMenuCommand
æD FUNCTION TApplication.DoMenuCommand(aCmdNumber: CmdNumber): TCommand;
æFi UMacApp.p
æT METHOD
æC DoMenuCommand performs the appropriate actions to process a user’s menu
selection. This method performs simple commands passed to it in the aCmdNumber
parameter and returns NIL; it returns a TCommand object to handle complex commands.
Commands it cannot handle are passed back to the command chain by calling
INHERITED DoMenuCommand. The parameter aCmdNumber is the command number defined for
the selected menu item. This method responds to certain commands predefined by
MacApp in the file UMacApp.p; you can define others in your 'cmnu' resource
description and in the appropriate interface or implementation file. MacApp calls
DoMenuCommand when the user selects a command from a menu. You usually do not
need to call this method yourself. Overrides of this method should call INHERITED
DoMenuCommand as their last action to return commands they do not handle to the
command chain.
æKY TApplication.DoSetupMenus
æD PROCEDURE TApplication.DoSetupMenus; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoSetupMenus enables menu items to which the TApplication object’s DoMenuCommand
method can respond. MacApp calls DoSetupMenus when the menus may have changed
since the last time DoSetupMenus was called; it is called from
TApplication.SetupTheMenus before displaying the menus. You must override this method
if you override TApplication.DoMenuCommand. Your override method must set up the menu
commands handled by TYourApplication.DoMenuCommand. You should begin your override
method by calling INHERITED DoMenuCommand to allow MacApp to set up the standard
menu commands first. For more information, see the discussion of menus and menu
commands in the MacApp 2.0 Cookbook.
æKY TApplication.DoShowAboutApp
æD PROCEDURE TApplication.DoShowAboutApp;
æFi UMacApp.p
æT METHOD
æC DoShowAboutApp displays the application's About box. The default method displays
the About MacApp box. MacApp calls this method from the command object created
by TApplication.DoMenuCommand when the user chooses the About menu item. You
can override this method to display your own About box. You usually do not need
to call DoShowAboutApp yourself.
æKY TApplication.EachFreeWindow
æD PROCEDURE TApplication.EachFreeWindow(PROCEDURE DoToWindow(aWindow: TWindow));
æFi UMacApp.p
æT METHOD
æC EachFreeWindow performs the DoToWindow procedure on each TWindow object in the
application's free-window list, in order of the windows' creation. DoToWindow is
a procedure that you define and pass to EachFreeWindow. The procedure you
define can have any name, just as variables that you pass as arguments can have any
name. The procedure passed in DoToWindow must take a single parameter of type
TWindow. EachFreeWindow iterates over all entries in the TApplication object's
free-window list, binding each one in turn to the aWindow parameter and
executing the passed procedure. MacApp calls EachFreeWindow from
TApplication.ForAllWindowsDo when it must perform some operation on every free window
belonging to the application. You can use this method for similar purposes.
æKY TApplication.Fields
æD PROCEDURE TApplication.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TApplication object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TApplication object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TApplication.ForAllDocumentsDo
æD PROCEDURE TApplication.ForAllDocumentsDo(PROCEDURE DoToDoc(aDocument: TDocument));
æFi UMacApp.p
æT METHOD
æC ForAllDocumentsDo performs the specified procedure on all open documents
currently owned by the application. DoToDoc is a procedure that you define and pass to
ForAllDocumentsDo. The procedure you define can have any name, just as
variables that you pass as arguments can have any name. The procedure passed in
DoToDoc must take a single parameter of type TDocument, which is the aDocument
parameter. ForAllDocumentsDo iterates over all entries in the application's document
list, binding each one in turn to the aDocument parameter and executing the
passed procedure. MacApp calls ForAllDocumentsDo when it must apply some action to
all currently existing document objects—for example, to close all open
documents. You can use this method in a similar fashion.
æKY TApplication.ForAllWindowsDo
æD PROCEDURE TApplication.ForAllWindowsDo(PROCEDURE DoToWind(aWindow: TWindow));
æFi UMacApp.p
æT METHOD
æC ForAllWindowsDo performs the specified procedure on all windows of all
documents, as well as on all windows in the application's free-window list. DoToWind
is a procedure that you define and pass to ForAllWindowsDo. The procedure you
define can have any name, just as variables that you pass as arguments can have any
name. The procedure passed in DoToWind must take a single parameter of type
TWindow, which is the aWindow parameter. ForAllWindowsDo iterates over all
entries in the application's document list, executing the passed procedure on every
window belonging to every document, then performs DoToWindow on every window in
the application's free-window list. MacApp calls ForAllWindowsDo when it must
apply some action to all currently existing windows. You can use this method in
a similar fashion.
æKY TApplication.GetActiveWindow
æD FUNCTION TApplication.GetActiveWindow: TWindow;
æFi UMacApp.p
æT METHOD
æC GetActiveWindow returns the TWindow object that is the active application
window. This method returns NIL if the front window is a desk accessory or a floating
window, is not active, is not shown, or is NIL. MacApp calls GetActiveWindow
in a wide variety of situations ranging from setting up menus to handling
commands and debugging. You can call this method when you need a reference to the
active TWindow object.
æKY TApplication.GetDataToPaste
æD FUNCTION TApplication.GetDataToPaste(aDataHandle: Handle;
VAR dataType: ResType): LONGINT;
æFi UMacApp.p
æT METHOD
æC GetDataToPaste ensures that the clipboard view actually exists and contains data
of a resource type that the application is able to paste. If these conditions
are met, GetDataToPaste stores the current desk scrap into the specified handle
by calling TView.GivePasteData; it also returns the paste data's size in bytes
and its resource type. If the call to GivePasteData fails, it returns a
negative value; GetDataToPaste returns this negative value as its error code. This
negative value is either the constant noTypeErr (-102), which specifies that
there was no data of the requested type, or an operating system result code. The
aDataHandle parameter is an empty handle that you allocate and pass to this
method to use for Clipboard data. The data may be cut or copied from your
application, or it may be read from the desk scrap. GetDataToPaste returns the
resource type to be used for this particular paste operation in the dataType parameter,
which is set equal to the value of the global variable gPrefClipType. The global
routine CanPaste sets the value of gPrefClipType; your application should set
gPrefClipType by passing its preferred data type to CanPaste. MacApp calls this
method from methods that implement the Paste command. You can use this method
in a similar fashion. For more detailed information, see the discussion of
supporting the Paste command in the MacApp 2.0 Cookbook.
æKY TApplication.GetEvent
æD FUNCTION TApplication.GetEvent(eventMask: INTEGER; sleep: LONGINT;
cursorRgn: RgnHandle; VAR anEvent: EventRecord): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC GetEvent gets events from the system by calling WaitNextEvent or GetNextEvent
with the specified event mask, sleep, and cursor region parameters. GetEvent
returns the Boolean result of its call to GetNextEvent or WaitNextEvent. A return
value of FALSE indicates that the system handled the event; a value of TRUE
indicates that the application object must handle the event. Because MacApp
dispatches most events to the appropriate handlers for you, a return result of TRUE
does not necessarily mean that your application object must take special action
to handle the event. Only alien events (network events or special-purpose events
of your own creation) require specific event-handling behavior from your
application object. The eventMask parameter indicates the type of events that
GetEvent can return; its value is usually gMainEventMask. The sleep parameter
specifies the minimum number of ticks that can elapse before MultiFinder returns
control to the application when no events are pending. The cursorRgn parameter is a
handle to a region in which the cursor's shape does not change. This region is
specified in screen coordinates. The parameter anEvent is the event this method
returns from the Toolbox event record. MacApp calls GetEvent as part of the
main event loop as well as to obtain update and activate events. You usually do
not need to call this method yourself, unless your application must immediately
handle events of a type that is outside the scope of the main event loop, as
MacApp does in the method TWindow.HandleMouseDown. You can override this method
to get events from another source.
æKY TApplication.GetFrontWindow
æD FUNCTION TApplication.GetFrontWindow: TWindow;
æFi UMacApp.p
æT METHOD
æC GetFrontWindow returns the TWindow object that is the frontmost application
window (whether active or not). This method returns NIL if the front window is a
desk accessory or a floating window, is not shown, or is NIL. GetFrontWindow and
GetActiveWindow do the same thing except that GetFrontWindow does not test
whether the window is active. MacApp calls GetFrontWindow from
TApplication.HandleSystemEvent and TDebugApplication.HandleSystemEvent. You can call
this method when you need a reference to the frontmost (but not necessarily active)
TWindow object.
æKY TApplication.GetInspectorName
æD PROCEDURE TApplication.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName retrieves the name of the TApplication object for display in
the Inspector window. When the method returns, the inspectorName parameter
contains the name of the TApplication object. MacApp calls GetInspectorName from the
Inspector. You usually do not need to call this method yourself.
æKY TApplication.GetLastCommand
æD FUNCTION TApplication.GetLastCommand: TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetLastCommand returns the last undoable command. The command returned is not
yet committed. MacApp calls GetLastCommand to obtain the last undoable command.
You usually do not need to call this method.
æKY TApplication.GetNextCommand
æD FUNCTION TApplication.GetNextCommand: TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetNextCommand returns a command previously posted by TApplication.PostCommand ,
or NIL if there are no queued commands. TApplication.PollEvent calls this
method to retrieve queued commands. You probably will not need to call this method.
æKY TApplication.GetRsrcWindow
æD FUNCTION TApplication.GetRsrcWindow(storage: Ptr; rsrcId: INTEGER;
VAR isResizable, isClosable: BOOLEAN): WindowPtr;
æFi UMacApp.p
æT METHOD
æC GetRsrcWindow returns a pointer to a Window Manger window resource having the
specified resource ID. This method also returns values for isResizable and
isClosable according to the values defined in the 'WIND' resource. Regardless of the
visibility specified in the 'WIND' resource, the new window is created
invisibly to avoid flashing the screen. Even though this method creates a permanent
window, the memory is allocated from temporary memory to ensure that QuickDraw's
request for a grafPort does not fail. Because the request for tempoary memory
can affect the size of the low-space and code reserve, GetRsrcWindow checks the
size of the reserve and signals Failure with an error code of memFullErr if the
creation of the new window has caused the size of the reserve to become less
than that specified in the private global variable pSzCodeReserve. The storage
parameter is a pointer to the window pointer's record, or NIL if this record is
dynamically allocated. The rsrcId parameter is the resource ID of the 'WIND'
resource. The value of the isResizable parameter is TRUE if the window has a size
box. The value of the isClosable parameter is TRUE if the window has a close
box. MacApp calls GetRsrcWindow from TInspectWindow.IInspectWindow and from the
global routine NewTWindow to create a window pointer from a 'WIND' resource. You
usually do not need to call this method yourself; it is preferable to call the
global routine NewTWindow instead.
æKY TApplication.HandleActivateEvent
æD FUNCTION TApplication.HandleActivateEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleActivateEvent handles activate and deactivate events, calling the window's
Activate method with the parameters specified in the Toolbox event record for
the activate event. This method returns NIL. The parameter theEventInfo is the
information from the Toolbox event record for the activate event. MacApp calls
this method from TApplication.DispatchEvent to handle activate events. You
usually do not need to call this method yourself.
æKY TApplication.HandleAlienEvent
æD FUNCTION TApplication.HandleAlienEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleAlienEvent returns a TCommand object to handle "alien" events, which are
network events and application-specific events. The parameter theEventInfo is
the the Toolbox event record description of the event to be handled.
HandleAlienEvent is called from TApplication.DispatchEvent when the event is not one
normally handled by MacApp. You usually do not need to call this method yourself.
HandleAlienEvent calls TEvtHandler.DoHandleEvent, which by default returns FALSE
without passing the event record information back to its caller; you must
override TEvtHandler.DoHandleEvent to implement useful behavior in HandleAlienEvent.
Your override method should return NIL for events it cannot handle.
æKY TApplication.HandleDiskEvent
æD FUNCTION TApplication.HandleDiskEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleDiskEvent handles disk-inserted events and returns NIL. This method also
calls the Toolbox routine DIBadMount if the high word of the event message is
equal to any value besides noErr. The parameter theEventInfo is the information
from the Toolbox event record describing the event. MacApp calls HandleDiskEvent
from TApplication.DispatchEvent and TDebugApplication.DispatchEvent to handle
an event of type diskEvt. You usually do not need to call this method yourself.
æKY TApplication.HandleEvent
æD PROCEDURE TApplication.HandleEvent(VAR theEvent: EventRecord);
æFi UMacApp.p
æT METHOD
æC HandleEvent does much of the work of the main event loop, dispatching events as
they are passed to it by the system. The parameter theEvent is the information
from the Toolbox event record describing the event. MacApp calls this method in
the main event loop from TApplication.PollEvent, from TApplication.UpdateAllWindows to
handle window update events, and from TWindow.HandleMouseDown to process pending
window activations and deactivations. You usually do not need to call this method
yourself, unless you need to immediately handle events of a type that is outside the
scope of the main event loop, as is done by TWindow.HandleMouseDown.
æKY TApplication.HandleFinderRequest
æD PROCEDURE TApplication.HandleFinderRequest;
æFi UMacApp.p
æT METHOD
æC HandleFinderRequest gets information from the Finder about which files to open
or print, and then opens or prints them. MacApp calls this method from
TApplication.Run before processing any events. You usually do not need to call this
method yourself.
æKY TApplication.HandleKeyDownEvent
æD FUNCTION TApplication.HandleKeyDownEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleKeyDownEvent processes keyboard events, returning the appropriate TCommand
object to handle the keyboard event. If the Command key is pressed when this
method receives the keyboard event, it returns gTarget.DoCommandKey; otherwise,
it returns gTarget.DoKeyCommand. The parameter theEventInfo is the information
from the Toolbox event record describing the event. MacApp calls this method
from TApplication.DispatchEvent when it receives a keyboard or auto-key event.
You usually do not need to call this method yourself.
æKY TApplication.HandleMouseDown
æD FUNCTION TApplication.HandleMouseDown(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleMouseDown determines the location of the mouse-down event and calls the
appropriate event handler. If the mouse-down event occurs in the menu bar or the
window’s content area, HandleMouseDown returns the appropriate TCommand object
to handle the command; otherwise, it returns NIL. If the mouse-down event is in
a desk accessory, this method calls the Toolbox routine systemClick to handle
the event and returns NIL. The parameter theEventInfo is the information from
the Toolbox event record describing the mouse-down event that caused this method
to be called. MacApp calls this method from TApplication.DispatchEvent when it
receives a mouse-down event from the system. You usually do not need to call
this method yourself.
æKY TApplication.HandleMouseUp
æD FUNCTION TApplication.HandleMouseUp(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleMouseUp sets the value of gEventInfo.theClickCount to gClickCount and also
sets the value of gLastUpTime. HandleMouseUp returns NIL. The parameter
theEventInfo is the information from the Toolbox event record describing the mouse-up
event. MacApp calls this method from TApplication.DispatchEvent when it
receives a mouse-up event from the system. You usually do not need to call this
method yourself.
æKY TApplication.HandleSystemEvent
æD FUNCTION TApplication.HandleSystemEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleSystemEvent handles system events, in particular suspend events, resume
events, and mouse-moved events. It calls TApplication.RegainControl if control
passes to the TApplication object from some other application; it calls
TApplication.AboutToLoseControl if control switches to another application; or it
calls TApplication.TrackCursor if a mouse-moved event occurs. The method returns NIL.
The parameter theEventInfo is the information from the Toolbox event record
describing the system event. MacApp calls this method from TApplication.DispatchEvent
when it receives an event from the System. You usually do not need to call this
method yourself.
æKY TApplication.HandleUpdateEvent
æD FUNCTION TApplication.HandleUpdateEvent(VAR theEventInfo: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC HandleUpdateEvent calls TWindow.Update for the specified window and returns NIL.
The parameter theEventInfo is the information from the Toolbox event record
describing the window update event. MacApp calls this method from
TApplication.DispatchEvent when it receives an update event from the system. You
usually do not need to call this method yourself.
æKY TApplication.IApplication
æD PROCEDURE TApplication.IApplication(itsMainFileType: OSType);
æFi UMacApp.p
æT METHOD
æC IApplication initializes the TApplication object, setting up the object’s fields
so that the application can run. The itsMainFileType parameter is the 4-byte
identifier specifying the file type that this application reads and writes. The
file type is required here so that you need not override
TApplication.SFGetParms to supply the type there. TApplication.SFGetParms is the only
place the main file type is used; if your application can open more than one file type,
you must override TApplication.SFGetParms. MacApp never calls IApplication; you must
always call this method from the TYourApplication.IYourApplication method that
you implement.
æKY TApplication.IdentifySoftware
æD PROCEDURE TApplication.IdentifySoftware; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC IdentifySoftware writes version information for the UMacApp and UObject units to
the Debug Transcript window. If the value of the qDebug flag is TRUE, this
method also writes version information for the UDebug unit to the Debug Transcript
window. IdentifySoftware is called from the MacApp debugger when the user
chooses the Show Software Version command from the Debug menu. You usually do not
need to call this method yourself. You can override it to add further
information to the debug transcript.
æKY TApplication.Idle
æD PROCEDURE TApplication.Idle(phase: IdlePhase);
æFi UMacApp.p
æT METHOD
æC Idle calls the DoIdle method of each handler in the target and cohandler chains;
it also displays the busy cursor when the application is temporarily unable to
respond to user commands. The phase parameter has the value idleBegin,
idleContinue, or idleEnd depending on whether the application has yet to begin its
idle-time tasks, is processing them, or has completed them. MacApp calls Idle from
TApplication.GetEvent and TApplication.PollEvent to allow objects to do
idle-time processing. You usually do not need to override or call this method
yourself. If you wish to execute other tasks at idle time you must override the
appropriate event handler's DoIdle method.
æKY TApplication.InModalMenuState
æD FUNCTION TApplication.InModalMenuState: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC InModalMenuState returns the value TRUE if the frontmost window does not allow
access to other windows or to menu commands. MacApp calls this method when the
user attempts to choose a menu either with the mouse or with a Command-key
sequence. You usually do not need to call this method yourself, nor do you need to
override it; if you need to prevent menu access while modal windows are active,
you should override the window's AllowsMenuAccess method.
æKY TApplication.InModalState
æD FUNCTION TApplication.InModalState: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC InModalState returns TRUE if the front window is modal. This method is the same
as TApplication.InModalMenuState except that it allows menu access when the
front window is modal. MacApp calls InModalState to determine whether the
application is in a modal state; typically, this is when the user clicks outside the
active window and outside the menu bar. This method is also called from
TApplication.SetupTheMenus to determine whether to enable or disable the Apple menu.
You usually do not need to call this method yourself; however, you can do so to
determine whether the application is in a modal state.
æKY TApplication.InstallCohandler
æD PROCEDURE TApplication.InstallCohandler(aCohandler: TEvtHandler; addIt: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC InstallCohandler adds a cohandler to or deletes a cohandler from the
application's list of cohandlers. The aCohandler parameter is the event handler to be
added or deleted. If the value of the addIt parameter is TRUE, the cohandler is
added to the list; otherwise, it is deleted. MacApp never calls this method; you
can use it to install and remove event handlers in the application's list of
cohandlers.TApplication
æKY TApplication.InvalidateCursorRgn
æD PROCEDURE TApplication.InvalidateCursorRgn;
æFi UMacApp.p
æT METHOD
æC This method invalidates the cursor region; MultiFinder uses this information to
determine that it should notify your application that the mouse has moved and
some application-specific action must take place—for instance, a response to a
user action that caused the mouse to move. When the application is not using
MultiFinder, the invalid cursor region is used to give all subviews a chance to
set the cursor. MacApp calls this method to cause the cursor region to be
recomputed when resizing or displaying windows, when displaying dialog boxes, and when
control is returned to the application from another layer in the MultiFinder
environment. You can use this method to destroy the previous structure of the
cursor region and set gCursorRgn to the empty region (0,0,0,0).
æKY TApplication.InvalidateFocus
æD PROCEDURE TApplication.InvalidateFocus;
æFi UMacApp.p
æT METHOD
æC InvalidateFocus calls TView.InvalidateFocus for the currently focused view and
all of its subviews, then sets the value of gFocusedView to NIL. MacApp calls
this method from various methods that manipulate views. You can use this method
to "unfocus" the currently focused view.
æKY TApplication.IsDeskAccessory
æD FUNCTION TApplication.IsDeskAccessory(aWmgrWindow: WindowPtr): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsDeskAccessory returns the value TRUE if the specified Window Manager window is
a desk accessory. MacApp assumes that any window with a negative windowKind is
a desk accessory. The aWMgrWindow parameter is a pointer to the Window Manager
window to be tested. MacApp calls this method from several methods that
manipulate windows, including TApplication.CloseWMgrWindow,
TApplication.PostHandleEvent, and TApplication.WMgrToWindow. You usually do not need
to call this method yourself, because in MacApp you most often work with references
to TWindow objects rather than pointers to Window Manager windows. You can call this
method, however, if you want to know whether a Window Manager window pointer
represents a desk accessory.
æKY TApplication.KeyEventToComponents
æD PROCEDURE TApplication.KeyEventToComponents(VAR info: EventInfo); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC KeyEventToComponents extracts the character components of a key event using
techniques compatible with the Script Manager. The info parameter is the event
record description of the event. TApplication.HandleKeyDownEvent calls this method
to obtain the character and ASCII key code information. You usually do not need
to call this method yourself.
æKY TApplication.KindOfDocument
æD FUNCTION TApplication.KindOfDocument(itsCmdNumber: CmdNumber;
itsAppFilePtr: AppFilePtr): CmdNumber;
æFi UMacApp.p
æT METHOD
æC KindOfDocument returns the command number to be passed to DoMakeDocument when
creating a document; the command number indicates the type of document to create.
The default method returns itsCmdNumber. The itsCmdNumber parameter can be a
command number passed by DoMenuCommand or a command constant. Possible command
constant values used by KindOfDocument include cFinderNew, cFinderPrint, or
cFinderOpen. The command number is used in the 'cmnu' resource in the resource
description file; you typically define a constant to represent that number in both
the resource description file and in the appropriate interface or
implementation file of the application. The itsAppFilePtr parameter is a pointer to an
AppFile record or NIL. The reference itsAppFilePtr^.fileType specifies the
4-character document file type used when opening existing files; when creating a new
document, the itsAppFilePtr parameter is NIL. MacApp calls this method to create
TDocument objects used when opening new or old files and when printing from the
Finder. You usually do not need to call this method yourself; however, you must
override it if your application uses more than one kind of document. Your
implementation of this method uses the itsAppFilePtr parameter to determine what
kind of document object should be created. The command number you return is
normally the same as that returned if the New or Open menu command was chosen. (In
applications with multiple document types, you usually have different New or
Open menu commands for different document types.) By using different command
numbers for different kinds of documents, your application's DoMakeDocument method
can make different kinds of documents according to the command number it
receives.
æKY TApplication.LaunchClipboard
æD PROCEDURE TApplication.LaunchClipboard;
æFi UMacApp.p
æT METHOD
æC LaunchClipboard creates the view used as the Clipboard and places the current
contents of the desk scrap in it. TApplication.Run calls this method before the
main event loop. You usually do not need to call this method yourself.
æKY TApplication.MainEventLoop
æD PROCEDURE TApplication.MainEventLoop;
æFi UMacApp.p
æT METHOD
æC MainEventLoop is the main event loop of the application. It repeatedly calls
TApplication.UnloadAllSegments and the global routine PollEvent, dispatching
user-generated events to appropriate handlers until the user quits the application
MacApp calls MainEventLoop from TApplication.Run. You usually do not need to
override this method or call it yourself.
æKY TApplication.MakeClipboardWindow
æD FUNCTION TApplication.MakeClipboardWindow: TWindow;
æFi UMacApp.p
æT METHOD
æC MakeClipboardWindow creates the Clipboard window and associated views. MacApp
calls MakeClipboardWindow from TApplication.IApplication. You usually do not need
to call this method yourself.
æKY TApplication.MakeViewForAlienClipboard
æD FUNCTION TApplication.MakeViewForAlienClipboard: TView;
æFi UMacApp.p
æT METHOD
æC MakeViewForAlienClipboard creates a view (gClipOrphanage) used to display data
that is in the public desk scrap when your application is launched or when
control is returned to your application from a desk accessory or another
application. The default method creates a view capable of displaying TEXT or PICT
data; you can override this method to create views that display other types of data.
MacApp calls your OVERRIDE version of MakeViewForAlienClipboard from
TApplication.ReadFromDeskScrap to create a view that can display data types particular
to your application. Your override method should call INHERITED
MakeViewForAlienClipboard to display PICT or TEXT data. You can call this method to
create a clipboard view capable of displaying data particular to your application, or
call its inherited method to display PICT or TEXT data.
æKY TApplication.MenuEvent
æD FUNCTION TApplication.MenuEvent(menuItem: LONGINT): TCommand;
æFi UMacApp.p
æT METHOD
æC MenuEvent calls gTarget.DoMenuCommand and returns a command object according to
the value of the menuItem parameter. The menuItem parameter is a LONGINT value
specifying the menu number and the item number. The high word of this value
specifies the number of the menu that contains the item chosen and the low word
specifies the number of the item chosen from the menu. MacApp calls MenuEvent
from TApplication.DoCommandKey or TApplication.HandleMouseDown when the user
chooses a menu command. You usually do not have to call this method yourself.
æKY TApplication.OpenDeskAccessory
æD PROCEDURE TApplication.OpenDeskAccessory(deskAccName: Str255);
æFi UMacApp.p
æT METHOD
æC OpenDeskAccessory attempts to open the specified desk accessory. The deskAccName
parameter is the string naming the desk accessory to be opened. MacApp calls
OpenDeskAccessory from TApplication.MenuEvent when the user chooses a desk
accessory from the Apple menu. You usually do not need to call this method yourself.
æKY TApplication.OpenNew
æD PROCEDURE TApplication.OpenNew(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC OpenNew creates a new blank document and the views, including windows, necessary
to render it on the screen. The itsCmdNumber parameter specifies the kind of
document to be created. The command number is used in the 'cmnu' resource in the
resource description file; you typically define a constant to represent that
number in both the resource description file and in the appropriate interface or
implementation file of the application. MacApp calls OpenNew when the
application is opened or when the user chooses the New menu item. You usually do not
need to call this method yourself unless you want to implement a nonstandard way
of creating a new document. If you do not want to create a new document when
the user opens the application, set the value of the fLaunchWithNewDocument field
to FALSE in your TYourApplication.IYourApplication method after it calls
TApplication.IApplication, which sets this field to TRUE.
æKY TApplication.OpenOld
æD PROCEDURE TApplication.OpenOld(itsOpenCmd: CmdNumber; anAppFile: AppFile);
æFi UMacApp.p
æT METHOD
æC OpenOld opens an existing document and creates the views, including windows,
necessary to render it on the screen. The itsOpenCmd is the command number that
specifies whether the document was opened from the Finder, from the File menu
with the Open menu command, or for printing only. If the user double-clicks on the
document in the Finder, then itsOpenCmd equals cFinderOpen; if the document is
opened from the File menu, then itsOpenCmd equals cOpen; and if the document
is opened from the Finder for printing only, then itsOpenCmd equals
cFinderPrint. The anAppFile parameter specifies the file to be read when opening an
existing file. MacApp calls OpenOld when the TApplication object opens an existing
document. You usually do not need to call this method yourself.
æKY TApplication.PerformCommand
æD PROCEDURE TApplication.PerformCommand(command: TCommand); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC PerformCommand carries out different actions depending on whether the command
passed to it in the command parameter is a simple or complex command.
PerformCommand executes simple commands by calling the command’s DoIt method; if the
command’s fFreeOnCompletion field has the value TRUE, this method frees the command
after it is completed. PerformCommand executes complex commands by committing
the last complex command and calling the new command object's DoIt method. If
DoIt succeeds, then PerformCommand also updates the document’s fChangeCount
field. If the command object’s fFreeOnCompletion field has the value TRUE, the
command is freed upon completion of PerformCommand. The command parameter is the
TCommand object created to perform the command. The command parameter can pass
either simple or complex commands to this method. PerformCommand is called by the
TApplication methods HandleEvent and PollEvent. You usually do not need to call
this method yourself.
æKY TApplication.PollEvent
æD PROCEDURE TApplication.PollEvent(allowApplicationToSleep: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC PollEvent dispatches pending events, performs queued commands, and calls the
DoIdle method of each handler in the target and cohandler chains. The
allowApplicationToSleep parameter, if set to TRUE (kAllowApplicationToSleep),
specifies that, if no events are pending, the application is suspended - that is, it
will not idle - for the time determined by a composite of the fIdleFreq fields of all
event handlers in the active chain and in the cohandler chain. If the
allowApplicationToSleep parameter is FALSE, the application can idle any time that
there are no events in the queue. PollEvent is called by TApplication.MainEventLoop.
You do not normally call or override either MainEventLoop or PollEvent
yourself; however you could call PollEvent during a lengthy operation to give
processor time to other applications running in the MultiFinder environment.
æKY TApplication.PostCommand
æD PROCEDURE TApplication.PostCommand(command: TCommand); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC PostCommand posts the specified command to a command queue for later execution.
The command parameter is the TCommand object to be posted to the queue. You
call this method to post a command to a command queue.
æKY TApplication.PostHandleEvent
æD PROCEDURE TApplication.PostHandleEvent(VAR theEventInfo: EventInfo);
æFi UMacApp.p
æT METHOD
æC PostHandleEvent performs certain housekeeping functions after MacApp handles an
event in TApplication.HandleEvent. If the menu bar needs to be redrawn, then
PostHandleEvent does so. PostHandleEvent also determines if control is about to
pass to another application or a desk accessory; if so, it calls
AboutToLoseControl. This method also calls RegainControl when control passes back to
the application. The parameter theEventInfo is the event record for the event being
handled. MacApp calls PostHandleEvent from HandleEvent. You usually do not need to
call this method yourself.
æKY TApplication.PrintDocument
æD FUNCTION TApplication.PrintDocument(anAppFile: AppFile): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC When printing multiple documents from the Finder, PrintDocument returns the
value TRUE as long as the user does not cancel printing. The anAppFile parameter
specifies the file to be printed next, according to the method
TApplication.HandleFinderRequest. PrintDocument is called by
TApplication.HandleFinderRequest
when the user prints documents in the Finder. You usually do not need to call this
method yourself.
æKY TApplication.ReadFromDeskScrap
æD PROCEDURE TApplication.ReadFromDeskScrap;
æFi UMacApp.p
æT METHOD
æC ReadFromDeskScrap installs the contents of the desk scrap in the Clipboard view.
MacApp calls ReadFromDeskScrap when launching the application and when the
desk scrap changes. You usually do not need to call ReadFromDeskScrap yourself; it
is preferable to call TApplication.CheckDeskScrap.
æKY TApplication.RegainControl
æD PROCEDURE TApplication.RegainControl(checkClipboard: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC RegainControl activates the busy cursor mechanism and, if requested, installs
the desk scrap in the current clipboard view. If the checkClipboard parameter has
the value TRUE and the desk scrap has changed, this method calls
TApplication.CheckDeskScrap to install the desk scrap in the current clipboard view.
RegainControl is called when control passes back to the application from a desk
accessory or another layer in the MultiFinder environment.
æKY TApplication.ReportEvent
æD PROCEDURE TApplication.ReportEvent(VAR theEvent: EventRecord);
æFi UMacApp.p
æT METHOD
æC ReportEvent displays information about an event in the Debug Transcript window.
The parameter theEvent is the event that this method reports. ReportEvent is
called only in applications compiled with debugging code included. In these
applications, this method is called by TApplication.HandleEvent whenever an event is
dispatched. You usually do not need to call this method yourself.
æKY TApplication.Run
æD PROCEDURE TApplication.Run;
æFi UMacApp.p
æT METHOD
æC Run sets up and maintains the application's runtime environment. When the
application is opened normally, Run creates the Clipboard view, calls
HandleFinderRequest and then calls MainEventLoop; when the application is opened only
to print from the Finder, Run loads the segment containing the printing code, calls
TApplication.HandleFinderRequest to do the printing, and then calls Close. If the
user is quitting the application or switching to another layer in the
MultiFinder environment, Run calls the TApplication method AboutToLoseControl. In
between calls to HandleFinderRequest and MainEventLoop, Run attempts to maximize
available memory by calling the global routine UnloadAllSegments. MacApp does not
call Run. You must call Run to begin your application’s main processing.
æKY TApplication.SelectWMgrWindow
æD PROCEDURE TApplication.SelectWMgrWindow(aWMgrWindow: WindowPtr);
æFi UMacApp.p
æT METHOD
æC SelectWMgrWindow makes the specified Window Manager window the active window. It
removes highlighting from the previously active window, makes the new active
window the frontmost window, highlights the new active window, and generates the
appropriate activate events. The aWMgrWindow parameter is a pointer to the
WindowManager window associated with a TWindow object. MacApp calls
SelectWMgrWindow from the methods TWindow.Select and TStdPrintHandler.DoPrintIdling to
activate the Window Manager window associated with a TWindow object or to bring a
print dialog window to the front. You usually do not need to call SelectWMgrWindow
yourself; it is preferable to call TWindow.Select to activate the TWindow
object associated with the Window Manager window.
æKY TApplication.SetClipView
æD PROCEDURE TApplication.SetClipView(clipView: TView);
æFi UMacApp.p
æT METHOD
æC SetClipView makes the specified view the Clipboard view. The clipView parameter
is the view this method sets as gClipView. SetClipView is called by several
methods that set the view to be used by the Clipboard. You can use this method in
a similar fashion.
æKY TApplication.SetTarget
æD PROCEDURE TApplication.SetTarget(newTarget: TEvtHandler);
æFi UMacApp.p
æT METHOD
æC SetTarget sets the value of gTarget to the specified TEvtHandler object. The
newTarget parameter is the object that is to be the head of the target chain.
SetTarget is called by several methods that activate or free windows, objects, or
views. You can use this method in similar fashion.
æKY TApplication.SetUndoText
æD PROCEDURE TApplication.SetUndoText(cmdDone: BOOLEAN; aCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC SetUndoText sets the text in the Undo menu item to Undo or Redo, followed by the
name of the command. If the value of the cmdDone parameter is TRUE, the text
reads Undo; otherwise, it reads Redo. The aCmdNumber parameter indicates the
command that follows the Undo or Redo text in the menu item. SetUndoText is called
by TApplication.SetupTheMenus. You usually do not need to call this method
yourself.
æKY TApplication.SetupTheMenus
æD PROCEDURE TApplication.SetupTheMenus;
æFi UMacApp.p
æT METHOD
æC SetupTheMenus initiates the process of enabling and checking menu items.
SetupTheMenus is called by several methods that can change the status of menu items.
You usually do not need to call this method yourself.
æKY TApplication.SFGetParms
æD PROCEDURE TApplication.SFGetParms(itsCmdNumber: CmdNumber; VAR dlgID: INTEGER;
VAR where: Point; VAR fileFilter, dlgHook, filterProc: ProcPtr; typeList: HTypeList);
æFi UMacApp.p
æT METHOD
æC SFGetParms returns all the parameters used as arguments to the Toolbox procedure
SFGetFile. The itsCmdNumber parameter is the command number of the command
that caused SFGetParms to be called. The command number is used in the 'cmnu'
resource in the resource description file; you typically define a constant to
represent that number in both the resource description file and in the appropriate
interface or implementation file of the application. The dlgID parameter is the
resource ID of the dialog template used to compute the location of the Standard
File dialog box; when the method returns, its default value is equal to
getDlgID. (The value of the constant getDlgID is equal to the resource ID of the
standard SFGetFile dialog box.) The where parameter specifies the location of the
Standard File dialog box in global coordinates. When SFGetParms returns, the
default value of the where parameter is (100,100). The fileFilter parameter is a
pointer to a procedure that allows only files of a specified type to be
displayed; when SFGetParms returns, the default value of the fileFilter parameter is
equal to NIL. The dlgHook parameter is a pointer to a function that you write if
you want to use your own dialog box instead of the standard SFGetFile dialog
box, or if you want to handle any of the standard items in the SFGetFile dialog
box in a nonstandard way; when SFGetParms returns, the default value of the
dlgHook parameter is equal to NIL. The filterProc parameter is a pointer to a
procedure that you write if you want to impose event filtering beyond that provided
by the Toolbox routine ModalDialog; when SFGetParms returns, the default value
of the filterProc parameter is equal to NIL. The typeList parameter is a handle
to a list of main file types supported by the application. When you call
SFGetParms, the typeList parameter must be a valid handle to a zero-length block;
SFGetParms sets the handle size and fills in the value stored in the global
variable gMainFileType. SFGetParms is called by the TApplication methods
CanOpenDocument and ChooseDocument. You can override it to modify the behavior of the
Standard File package; for example, to supply an extended type list or to implement
your own filter procedure.
æKY TApplication.ShowError
æD PROCEDURE TApplication.ShowError(error: OSErr; message: LONGINT);
æFi UMacApp.p
æT METHOD
æC ShowError displays an alert box having the specified error number and message.
The error parameter identifies the type of error that occurred. The message
parameter specifies the error message to be displayed. MacApp calls ShowError to
display certain standard messages in response to error conditions. You usually do
not need to call ShowError yourself; if you wish to display an error to the
user you can use the global routine ErrorAlert, which looks up the text string
associated with an OSErr code and displays the text in an alert box.
æKY TApplication.SpaceIsLow
æD PROCEDURE TApplication.SpaceIsLow;
æFi UMacApp.p
æT METHOD
æC SpaceIsLow displays an alert box informing the user that memory space is low.
MacApp calls this method when memory space is low, at intervals of
kLowSpaceInterval ticks. You usually do not need to call this method yourself; you can
override it, however, if you wish to take more appropriate action.
æKY TApplication.SwapClipViews
æD PROCEDURE TApplication.SwapClipViews;
æFi UMacApp.p
æT METHOD
æC SwapClipViews exchanges the contents of the "Undo Clipboard" view for those of
the current clipboard view. SwapClipView is called when executing Undo or Redo
methods. You usually do not need to call this method yourself.
æKY TApplication.TrackCursor
æD FUNCTION TApplication.TrackCursor: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC TrackCursor returns TRUE if the cursor has been set by a view; if not, this
method sets the cursor to the arrow cursor and returns FALSE. TrackCursor is called
by the TApplication methods HandleSystemEvent, PollEvent, and Idle. You
usually do not need to call this method yourself.
æKY TApplication.TrackMouse
æD FUNCTION TApplication.TrackMouse(globalMouse, hysteresis: Point;
theCommand: TCommand): TCommand;
æFi UMacApp.p
æT METHOD
æC TrackMouse tracks the movement of the mouse pointer after a mouse-down event and
returns a TCommand object that handles the user’s actions. The globalMouse
parameter is the location of the mouse-down event in global QuickDraw™
coordinates. The hysteresis parameter is a point that represents the horizontal and
vertical distance the mouse can travel between clicks and still be considered to be
at the same location. MacApp uses this parameter to determine whether a double
click has occurred or if a control has moved. The parameter theCommand indicates
the command object that is tracking the mouse. MacApp calls TrackMouse from
TApplication.HandleMouseDown. You usually do not need to call this method
yourself.
æKY TApplication.UpdateAllWindows
æD PROCEDURE TApplication.UpdateAllWindows;
æFi UMacApp.p
æT METHOD
æC UpdateAllWindows processes all update events in the queue. MacApp calls
UpdateAllWindows to handle all pending update events before calling the Standard File
package or posing a print job dialog box. You can use this method in a similar fashion.
æKY TApplication.WMgrToWindow
æD FUNCTION TApplication.WMgrToWindow(aWMgrWindow: WindowPtr): TWindow;
æFi UMacApp.p
æT METHOD
æC WMgrToWindow returns the TWindow object that represents the specified Window
Manager window; it returns NIL if there is no window object. The aWMgrWindow
parameter is a pointer to the Window Manager window. WMgrToWindow is called by
several methods that directly manipulate windows. You can call WMgrToWindow to
obtain the TWindow object associated with a particular window record.
æKY TAssociation.EachEntryDo
æD PROCEDURE TAssociation.EachEntryDo(PROCEDURE DoToEntry(theEntry: TEntry));
æFi UAssociation.p
æT METHOD
æC EachEntryDo performs the procedure DoToEntry on each entry in the TAssociation
object. DoToEntry is a procedure that you define and pass to EachEntryDo. The
procedure you define can have any name, just as variables that you pass as
arguments can have any name. The procedure passed in DoToEntry must take a single
parameter of type TEntry. EachEntryDo iterates over all entries in the
TAssociation object, binding each one to theEntry and executing the specified
procedure. MacApp calls EachEntryDo when it must perform some operation on every
entry in a TAssociation object. You can use it for similar purposes.
æKY TAssociation.EntryWithKey
æD FUNCTION TAssociation.EntryWithKey(keyStr: Str255): TEntry;
æFi UAssociation.p
æT METHOD
æC EntryWithKey searches the entries in the TAssociation object for the first entry
whose key is the same as the specified keyStr parameter. If the method finds
such an entry, then it returns that TEntry object. If EntryWithKey fails to find
such an entry, then it returns NIL. The keyStr parameter is the key that
EntryWithKey must find. MacApp calls EntryWithKey from several methods that maintain
data structures incorporating TAssociation objects. You can use this method to
find particular TEntry objects in TAssociation objects of your own.
æKY TAssociation.EntryWithValue
æD FUNCTION TAssociation.EntryWithValue(valueStr: Str255): TEntry;
æFi UAssociation.p
æT METHOD
æC EntryWithValue searches the entries in the TAssociation object for the first
entry whose value is the same as the specified valueStr parameter. If
EntryWithValue finds such an entry, then it returns that TEntry object; otherwise, it
returns NIL. The valueStr parameter is the value that EntryWithValue must find.
MacApp calls EntryWithValue from several methods that maintain data structures
incorporating TAssociation objects. You can use this method to find particular
TEntry objects in TAssociation objects of your own.
æKY TAssociation.Fields
æD PROCEDURE TAssociation.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Fields reports the contents of each field of the TAssociation object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TAssociation object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TAssociation.FirstEntryThat
æD FUNCTION TAssociation.FirstEntryThat
(FUNCTION TestEntry(theEntry: TEntry): BOOLEAN): TEntry;
æFi UAssociation.p
æT METHOD
æC FirstEntryThat searches the TAssociation object for the first entry that
satisfies the specified test. If FirstEntryThat finds such an entry, then it returns
that TEntry object; otherwise, it returns NIL. TestEntry is a function that you
define for testing entries. This function can have any name, just as variables
that you pass as parameters can have any name, and must take one parameter of
type TEntry. The function must return a Boolean value that should be TRUE for
the entry you want to find and FALSE otherwise. FirstEntryThat iterates over the
entries in the TAssociation object, binding each TEntry object to TEntry, until
the TestEntry function returns TRUE or all entries have been examined and NIL
is returned. If the TestEntry function returns TRUE, FirstEntryThat returns
that TEntry object. MacApp calls FirstEntryThat from methods that search for
TEntry objects with specified values. You can use FirstEntryThat when you need to
search TAssociation objects for entries that have some particular characteristic.
æKY TAssociation.Free
æD PROCEDURE TAssociation.Free; OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Free releases the memory used by the TAssociation object and all its entries.
This method is called as an inherited method by the Free methods of
TAssociation’s subclasses. You can call Free to release the memory used by a
TAssociation
object when you no longer need that object.
æKY TAssociation.IAssociation
æD PROCEDURE TAssociation.IAssociation;
æFi UAssociation.p
æT METHOD
æC IAssociation initializes the fields of the TAssociation object, creating a
TEntriesList object and assigning it to the field fEntries. This method calls the
MacApp failure handler if it cannot create the TEntriesList object. MacApp calls
IAssociation to initialize TAssociation objects that it creates. You must call
this method when you create instances of your own TAssociation subclasses.
æKY TAssociation.InsertEntry
æD PROCEDURE TAssociation.InsertEntry(keyStr, valueStr: Str255);
æFi UAssociation.p
æT METHOD
æC InsertEntry adds a TEntry object to the TAssociation object’s list of entries.
The keyStr parameter is the key under which the new entry is stored, and
valueStr is the value associated with that key. MacApp calls InsertEntry when adding
entries to its TAssociation objects. You can use it for similar purposes.
æKY TAssociation.KeyAt
æD FUNCTION TAssociation.KeyAt(valueStr: Str255; VAR keyStr: Str255): BOOLEAN;
æFi UAssociation.p
æT METHOD
æC KeyAt finds the key associated with the specified value and returns it in
keyStr. The valueStr parameter is the value that KeyAt must find. When KeyAt returns,
the keyStr parameter contains the corresponding key, or the empty string if
KeyAt found no such value. The function returns the value TRUE if an associated
string was found, or FALSE if no string was found. MacApp does not call KeyAt.
You can call KeyAt when you need to find in a TAssociation object the key that
is associated with a specified value.
æKY TAssociation.RemoveKeyAt
æD PROCEDURE TAssociation.RemoveKeyAt(valueStr: Str255);
æFi UAssociation.p
æT METHOD
æC RemoveKeyAt searches for an entry in the TAssociation object with the specified
value. If it finds such an entry, it deletes that entry from the TAssociation
object’s list. The valueStr parameter specifies the value that RemoveKeyAt must
find. If the method cannot find that value, it does not change the TAssociation
object’s list. MacApp does not call RemoveKeyAt. You can use RemoveKeyAt to
delete entries with a specified value from TAssociation objects.
æKY TAssociation.RemoveValueAt
æD PROCEDURE TAssociation.RemoveValueAt(keyStr: Str255);
æFi UAssociation.p
æT METHOD
æC RemoveValueAt searches the TAssociation object for an entry stored with the
specified key. If it finds such an entry, it deletes that entry from the
TAssociation object’s list. The keyStr parameter specifies the key that RemoveValueAt
must find. If the method cannot find that key, it does not change the TAssociation
object’s list. MacApp does not call RemoveValueAt. You can call RemoveValueAt
to delete entries with a specified key from TAssociation objects.
æKY TAssociation.ValueAt
æD FUNCTION TAssociation.ValueAt(keyStr: Str255; VAR valueStr: Str255): BOOLEAN;
æFi UAssociation.p
æT METHOD
æC ValueAt searches the TAssociation object for an entry stored with the specified
key. If ValueAt finds such an entry, it returns TRUE as the function result and
returns the associated value in the valueStr parameter; otherwise it returns
the empty string and a result of FALSE. The keyStr parameter is the key that
ValueAt must find. When ValueAt returns, the valueStr parameter contains the
corresponding value, or the empty string if ValueAt found no key value. The function
returns the value TRUE if an associated key was found, or FALSE if no key was
found. You can use ValueAt to find the value associated with a specified key in
a TAssociation object.
æKY TButton.Fields
æD PROCEDURE TButton.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TButton object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TButton
object, performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TButton.IButton
æD PROCEDURE TButton.IButton(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsLabel: Str255);
æFi UDialog.p
æT METHOD
æC IButton initializes a TButton object and associates it with a superview. The
fDefChoice field is set to mButtonHit. The itsSuperView parameter is the view
containing this button. The itsLocation parameter is the location of the button
described in the superview's view coordinates. The itsSize parameter is the size
of the control expressed in pixels. The itsHSizeDet and itsVSizeDet parameters
determine how the view's horizontal and vertical dimensions are calculated,
respectively. Possible values are sizeSuperView (subview to be the same size as
superview), sizeRelSuperView (subview size changes an equal amount relative to the
superview's size), sizePage (view to be the size of one page), sizeFillPages
(view grows to fill an exact number of pages), sizeVariable (view size
fluctuates according to application-specific criteria), or sizeFixed (no special
handling of size issues). The itsLabel parameter is the string that is the button's
label. You call this method when you are creating a button procedurally, rather
than creating it from a 'view' resource.
æKY TButton.IRes
æD PROCEDURE TButton.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TButton object from a 'view' resource template. The
fDefChoice field is set to mButtonHit. The itsDocument parameter specifies the document
affected by the button’s action. The itsSuperView parameter specifies the view
in which this button appears. The itsParams parameter is a pointer to the
portion of the 'view' resource data used to initialize this view. When the IRes
method finishes initializing the view, the method moves the pointer to the end of
this data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a
DoCreateViews call. You never need to call IRes yourself.
æKY TButton.WRes
æD PROCEDURE TButton.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TButton portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TButton section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the end
of the previously-written resource data; if there is not enough space to write
your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when the
WRes method completes.
æKY TButton.WriteRes
æD PROCEDURE TButton.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('butn') and
class name ('TButton') for the ‘view’ resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TButton object as part of a 'view' resource; you can use it in a similar fashion. You
can override this method to provide your own unique class name or signature.
æKY TCellSelectCommand.ComputeAnchorCell
æD PROCEDURE TCellSelectCommand.ComputeAnchorCell(VAR clickedCell: GridCell);
æFi UGridView.p
æT METHOD
æC ComputeAnchorCell calculates the first cell clicked in a selection that the user
made. The clickedCell parameter stores the coordinates of the cell the user
clicked in the fAnchorCell field. This method does not modify the value of
clickedCell; the use of a VAR parameter is not necessary, and will probably be
changed in a future version of MacApp. When the user selects one or more cells in a
TGridView view, ComputeAnchorCell is called by the TrackMouse method of
TCellSelectCommand or TRCSelectCommand. It may also be called by the ComputeAnchorCell
methods of TColumnSelectCommand, TRowSelectCommand, and TRCSelectCommand. You
can call ComputeAnchorCell to determine the first cell in a user selection in a
TGridView view. However, you usually will not need to call it yourself because
MacApp intercepts mouse commands and calls this method for you when
appropriate.
æKY TCellSelectCommand.ComputeNewSelection
æD PROCEDURE TCellSelectCommand.ComputeNewSelection(VAR clickedCell: GridCell);
æFi UGridView.p
æT METHOD
æC ComputeNewSelection stores the user's new selection in a TGridView view as a
rectangle in the TGridView variable fThisSelection. The clickedCell parameter
returns the coordinates of the cell the user clicked, within the limits of the
TGridView view. ComputeNewSelection is called by the TrackMouse methods of
TCellSelectCommand and TRCSelectCommand when the user selects one or more cells in a
TGridView view. It is also called by the ComputeNewSelection methods of
TCellSelectCommand's subclasses—TRCSelectCommand,TRowSelectCommand, and
TColumnSelectCommand. You can call ComputeNewSelection to determine user selections in
a TGridView view. However, you usually do not need to call it yourself because MacApp
intercepts mouse commands and calls this method for you when appropriate.
æKY TCellSelectCommand.DoIt
æD PROCEDURE TCellSelectCommand.DoIt; OVERRIDE;
æFi UGridView.p
æT METHOD
æC DoIt calls the appropriate methods for making a single- or multiple-cell
selection in a TGridView view. MacApp calls DoIt when the user selects one or more
cells in a TGridView view. You almost never call the DoIt method yourself.
æKY TCellSelectCommand.Fields
æD PROCEDURE TCellSelectCommand.Fields (PROCEDURE DoToField (fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TCellSelectCommand object to
the MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TCellSelectCommand object, performing DoToField on each one. The fieldName
parameter is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the
MacApp Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as
its last action to ensure that the inherited fields are also displayed.
æKY TCellSelectCommand.Free
æD PROCEDURE TCellSelectCommand.Free; OVERRIDE;
æFi UGridView.p
æT METHOD
æC Free releases the memory used by the selection and then calls INHERITED Free to
dispose of memory used by the command object and dependent structures. MacApp
calls Free when changing the current selection in a TGridView view. You usually
do not need to call this method yourself.
æKY TCellSelectCommand.HighlightNewSelection
æD PROCEDURE TCellSelectCommand.HighlightNewSelection;
æFi UGridView.p
æT METHOD
æC HighlightNewSelection provides visual feedback to the user by deselecting the
old selection and highlighting the cells in the new selection. You rarely call
this method yourself—TApplication.TrackMouse and TRCSelectCommand.TrackMouse call
TCellSelectCommand.HighlightNewSelection as needed when MacApp intercepts
mouse-down events.
æKY TCellSelectCommand.ICellSelectCommand
æD PROCEDURE TCellSelectCommand.ICellSelectCommand(itsView: TGridView;
theShiftKey,theCmdKey: BOOLEAN);
æFi UGridView.p
æT METHOD
æC ICellSelectCommand initializes the command object and associates it with a view.
The itsView parameter is the view associated with the command object. The
parameter theShiftKey is TRUE if the Shift key is currently pressed. The parameter
theCmdKey is TRUE if the Command key is currently pressed. ICommand is called
when the user selects one or more cells in a TGridView view. You can call this
method when you want to initialize a new TCellSelectCommand object. You rarely
need to call this method yourself, however; MacApp intercepts mouse commands and
calls ICellSelectCommand when appropriate.
æKY TCellSelectCommand.TrackFeedback
æD PROCEDURE TCellSelectCommand.TrackFeedback (anchorPoint, nextPoint: VPoint;
turnItOn, mouseDidMove: BOOLEAN); OVERRIDE;
æFi UGridView.p
æT METHOD
æC TrackFeedback provides onscreen feedback for the user while the mouse is being
tracked (that is, while the mouse button is pressed and a mouse-tracker object
exists). It is an empty method; user feedback for TCellSelectCommand objects is
implemented in the TrackMouse and HighlightNewSelection methods of this class.
Because it is an empty method, TrackFeedback ignores its parameters. If you
were to write your own version of this method, you could use them as the other
TrackFeedback methods do: The anchorPoint parameter is the position of the mouse
pointer, in view coordinates, when the mouse button was pressed. The nextPoint
parameter is the mouse pointer’s current position, described in view
coordinates. The value of the turnItOn parameter is TRUE if the feedback is to be
enabled. The value of the mouseDidMove parameter is TRUE if the mouse moved more than
the hysteresis value since the last time TrackFeedback was called. (MacApp uses
the hysteresis value to determine if multiple mouse clicks are close enough on
the screen to be considered part of a double or triple click.) You usually do
not need to call this method yourself; however, you can override it to provide
other kinds of feedback while tracking the mouse. (For further information, see
the discussion of mouse trackers in the MacApp 2.0 Cookbook.)
æKY TCellSelectCommand.TrackMouse
æD FUNCTION TCellSelectCommand.TrackMouse (aTrackPhase: TrackPhase; VAR anchorPoint,
previousPoint, nextPoint: VPoint; mouseDidMove: BOOLEAN): TCommand; OVERRIDE;
æFi UGridView.p
æT METHOD
æC This method tracks the mouse and sets the selection upon receiving the mouse-up
event when the user makes a selection in a TGridView view. In general, this
method allows you to carry out any actions (other than feedback or mouse
constraint) that depend on the movement of the mouse or on the track phase. This
method returns the mouse tracker that will be used in subsequent calls. Although
applications may sometimes return a different mouse-tracker object, TrackMouse
usually returns SELF. The aTrackPhase parameter describes the current phase of the
mouse-tracking process. MacApp sets its value to trackPress when the mouse
button is first pressed. When the mouse has moved more than the hysteresis value
since the last time TrackFeedback was called, MacApp sets the value of the
aTrackPhase parameter to trackMove. When the mouse button is released, MacApp sets
aTrackPhase to trackRelease. When aTrackPhase is set to trackPress, all three
points (anchorPoint, previousPoint, and nextPoint) have the same value. When
aTrackPhase is set to trackRelease, the nextPoint parameter contains the coordinates
of the location of the mouse-up event. The anchorPoint parameter is the
position of the mouse pointer, in view coordinates, when the mouse button was first
pressed. If you change this value, the new value is passed to you in the
parameter aTrackPhase the next time TrackMouse is called. The previousPoint parameter
is the position, in view coordinates, of the mouse pointer the last time
TrackMouse was called. The nextPoint parameter is the current position of the mouse
pointer, in view coordinates. Although you can change the value of nextPoint
yourself, it is preferable to use TCommand.TrackConstrain to limit mouse movement.
The value of nextPoint at the time TrackMouse exits will be passed to you as
the value of previousPoint the next time TrackMouse is called. MacApp sets the
value of the mouseDidMove parameter to TRUE if the mouse moved since the last
time TCommand.TrackFeedback was called. However, SELF.TrackConstrain may set the
mouse coordinates back to values as if no movement had occurred; thus, the mouse
has not necessarily moved the first time TrackMouse is called with aTrackPhase
set to trackMove. Test the value of mouseDidMove to determine whether you
should consider the mouse to have moved. The mouseDidMove parameter will have the
value TRUE if aTrackPhase has a value of either trackPress or trackRelease;
otherwise, its value is TRUE if nextPoint and previousPoint are not equal. You
never call TCellSelectCommand.TrackMouse yourself; rather, TApplication.TrackMouse
calls it when the mouse button is first pressed, as the mouse moves, and when
the mouse button is released. You often override this method to take
application-specific action. (For further information on mouse trackers, see the
discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TCheckBox.DoChoice
æD PROCEDURE TCheckBox.DoChoice(origView: TView; itsChoice: INTEGER); OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoChoice toggles the check box and sends the mCheckBoxHit message to its
superview. The origView parameter is the original view that received the event. The
itsChoice parameter is an integer that specifies whether the user clicked a
button, a check box, a text string, or another control. This method is part of the
command-handling mechanism in MacApp; it is called from DoCommandKey,
DoKeyCommand, and DoMouseCommand. Rather than calling this method when you want to
toggle a check box, use one of the TCheckBox methods SetState, Toggle, or ToggleIf.
æKY TCheckBox.Fields
æD PROCEDURE TCheckBox.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TCheckBox object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TCheckBox
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TCheckBox.ICheckBox
æD PROCEDURE TCheckBox.ICheckBox(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet,itsVSizeDet: SizeDeterminer; itsLabel: Str255; isTurnedOn: BOOLEAN);
æFi UDialog.p
æT METHOD
æC ICheckBox initializes a check box control and installs it in the given
superview. The fDefChoice field is set to mCheckBoxHit. The itsSuperView parameter is
the view in which the check box appears. The itsLocation parameter is the
location of the control, described in the view coordinates of itsSuperView. The
itsSize parameter is the size of the control expressed in pixels. The itsHSizeDet and
itsVSizeDet parameters determine how the view's horizontal and vertical
dimensions are calculated, respectively. Possible values are: sizeSuperView (subview
is the same size as superview), sizeRelSuperView (subview size changes an equal
amount relative to the superview's size), sizePage (view to be the size of one
page), sizeFillPages (view grows to fill an exact number of pages),
sizeVariable (view size fluctuates according to application-specific criteria), or
sizeFixed (no special handling of size issues). The itsLabel parameter is a string
that is the label of the check box. If the value of isTurnedOn is TRUE, the
control is initialized to be on. You call ICheckBox to initialize a check box that
was created procedurally.
æKY TCheckBox.IRes
æD PROCEDURE TCheckBox.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TCheckBox object from a 'view' resource template. The
fDefChoice field is set to mCheckBoxHit. The itsDocument parameter is ignored;
methods that call TCheckBox.IRes pass NIL in this parameter to avoid putting TCtlMgr
controls in a document’s view list. The itsSuperView parameter specifies the
view in which this check box appears. The itsParams parameter is a pointer to the
portion of the 'view' resource data used to initialize this view. When the IRes
method finishes initializing the view, the method moves the pointer to the end
of this data. MacApp calls this method for each of the views created from a
'view' resource template, usually in response to a NewTemplateWindow or a
DoCreateViews call. You never need to call IRes yourself.
æKY TCheckBox.IsOn
æD FUNCTION TCheckBox.IsOn: BOOLEAN;
æFi UDialog.p
æT METHOD
æC This method returns the value TRUE if the check box is currently on. IsOn is
called from the methods TCheckBox.IRes and TCheckBox.WRes when MacApp creates and
initializes a TCheckBox object. IsOn is also called by TCheckBox.Toggle and
TCheckBox.ToggleIf when setting the value of a TCheckBox object. You can call IsOn
to find out the current value of a TCheckBox control.
æKY TCheckBox.SetState
æD PROCEDURE TCheckBox.SetState(state, redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method turns the check box on or off, depending on the value of the state
parameter, and redraws the check box if requested. The value of the state
parameter sets the control's appearance; setting state to TRUE fills a check box or
radio button with the appropriate mark; setting state to FALSE clears it. If the
value of the redraw parameter is TRUE, the control is immediately redrawn with
the current value; otherwise, it is not, even though the new value may affect
its appearance. You can set redraw to FALSE when you know the control will
eventually be redrawn and you want to avoid drawing it twice, which makes the
screen appear to flicker or flash. SetState is called by TCheckBox.ICheckBox when
initializing a TCheckBox object. You can call it to change the state of a
TCheckBox control.
æKY TCheckBox.Toggle
æD PROCEDURE TCheckBox.Toggle(redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method turns the check box on or off. If the value of the redraw parameter
is TRUE, the control is immediately redrawn with the current value; otherwise,
it is not, even though the new value may affect its appearance. You can set
redraw to FALSE when you know the control will eventually be redrawn and you want
to avoid drawing it twice, which makes the screen appear to flicker or flash.
Toggle is called by TCheckBox.DoChoice to change the value of a TCheckBox object
in response to the user's choice. You can call this method to set the state of
a TCheckBox object.
æKY TCheckBox.ToggleIf
æD PROCEDURE TCheckBox.ToggleIf(matchState, redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC ToggleIf toggles the value of a TRadio button if thecontrol's current state
equals the value of the matchState parameter. The matchState parameter specifies
the state the control must match to be toggled. If the value of the matchState
parameter is TRUE, the control must be on to be toggled. If the value of the
matchState parameter is FALSE, the control must be off to be toggled. If the value
of the redraw parameter is TRUE, the control is redrawn with the current value;
otherwise, it is not, even though the new value may affect its appearance. You
can set redraw to False when you know the control will eventually be redrawn
and you want to avoid drawing it twice, which makes the screen appear to flicker
or flash. MacApp does not call this method; it is included for your
convenience. You can call ToggleIf when you wish to conditionally toggle the state
of a TCheckBox control.
æKY TCheckBox.WRes
æD PROCEDURE TCheckBox.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TCheckBox portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TCheckBox section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and
the size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TCheckBox.WriteRes
æD PROCEDURE TCheckBox.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('chkb') and
class name ('TCheckBox') for the ‘view’ resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TCheckBox object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or
signature.
æKY TClassesByID.Compare
æD FUNCTION TClassesByID.Compare(item1, item2: TObject): INTEGER; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Compare ranks TList objects by their ObjClassID numbers. The parameters item1
and item2 are the objects that Compare evaluates. Compare returns one of the
constants kItem1LessThanItem2, kItem1EqualItem2, or kItem1GreaterThanItem2,
according to whether the ObjClassID of item1 is less than, equal to, or greater than
the ObjClassID of item2. This method is internal to the Inspector; you cannot
call it yourself or override it.
æKY TClassesByID.Fields
æD PROCEDURE TClassesByID.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TClassesByID object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TClassesByID object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
This method is internal to the Inspector; you cannot call it yourself or
override it.
æKY TClassesByID.IClassesByID
æD PROCEDURE TClassesByID.IClassesByID;
æFm UInspector.inc1.p
æT METHOD
æC IClassesByID initializes a TClassesByID object. MacApp calls this method when
initializing the Inspector. This method is internal to the Inspector; you cannot
call it yourself or override it.
æKY TClassesByName.Compare
æD FUNCTION TClassesByName.Compare(item1, item2: TObject): INTEGER; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Compare ranks TList objects by their class names. Compare returns one of the
constants kItem1LessThanItem2, kItem1EqualItem2, or kItem1GreaterThanItem2,
according to whether the class name of item1 is less than, equal to, or greater than
the class name of item2. This method is internal to the MacApp Inspector; you
cannot call it yourself or override it.
æKY TClassesByName.Fields
æD PROCEDURE TClassesByName.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TClassesByName object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TClassesByName object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. This method is internal to the Inspector; you cannot call it yourself or
override it.
æKY TClassesByName.IClassesByName
æD PROCEDURE TClassesByName.IClassesByName;
æFm UInspector.inc1.p
æT METHOD
æC IClassesByName initializes a TClassesByName object. MacApp calls this method
when initializing the Inspector. This method is internal to the MacApp Inspector;
you cannot call it yourself or override it.
æKY TClassListView.DrawItem
æD PROCEDURE TClassListView.DrawItem(itemNumber: INTEGER; basePoint: Point); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DrawItem draws the class name of the item occupying a specific position in the
class list. The itemNumber parameter specifies the position in the list occupied
by the item to be drawn. The basePoint parameter is the pen’s starting
position, expressed in global coordinates. DrawItem is called by TListView.Draw once
for each item in a class list when it is drawing that list. This method is
internal to the Inspector; you cannot call it yourself or override it.
æKY TClassListView.Fields
æD PROCEDURE TClassListView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TClassListView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TClassListView object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. This method is internal to the Inspector; you cannot call it yourself or
override it.
æKY TClassListView.IClassListView
æD PROCEDURE TClassListView.IClassListView(itsWindow: TInspectWindow;
itsLocation: VPoint; itsSize: VPoint);
æFm UInspector.inc1.p
æT METHOD
æC IClassListView initializes a scrolling TClassListView list and installs it in a
window. The itsWindow parameter is the window in which the class list is
displayed. The itsLocation parameter is the location of the upper-left corner of the
list expressed in the window's local view coordinates. The itsSize parameter is
the size of the list expressed in pixels. IClassListView is called by
TInspectWindow.IInspectWindow in the course of initializing an Inspector window. This
method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TClassListView.IRes
æD PROCEDURE TClassListView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC IRes initializes a TClassListView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TClassListView
object. The itsSuperView parameter specifies the superview in which this view is
to be installed. The itsParams parameter is a pointer to the portion of the
'view' resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data.
MacApp calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call. This
method is internal to the Inspector; you cannot call it yourself or override it.
æKY TClassListView.SelectItem
æD PROCEDURE TClassListView.SelectItem(itemNumber: INTEGER); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC SelectItem selects a specified TObjectList element and then calls INHERITED
SelectItem. INHERITED SelectItem is empty; when overridden, it can do something to
the new selection. The itemNumber parameter is the selected item’s position in
the TClassListView list. Items in a TClassListView list are numbered
consecutively from the beginning of the list, starting with 1. This method is internal
to the Inspector; you cannot call it yourself or override it.
æKY TCloseWindowCommand.DoIt
æD PROCEDURE TCloseWindowCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt closes the window associated with this command. The window is that
associated with the fView field; this field is initialized by TCommand.ICommand.
MacApp calls this method when the user chooses the Close item from the application's
File menu. You never need to call DoIt yourself.
æKY TCloseWindowCommand.Fields
æD PROCEDURE TCloseWindowCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TCloseWindowCommand object to
the MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TCloseWindowCommand object, performing DoToField on each one. The fieldName
parameter is the name of the field. The fieldAddr parameter is the field’s location
in memory. The fieldType parameter uses a predefined constant to tell Fields
what type of information to look for in a field. MacApp calls Fields from the
MacApp Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as
its last action to ensure that the inherited fields are also displayed.
æKY TCloseWindowCommand.ICloseWindowCommand
æD PROCEDURE TCloseWindowCommand.ICloseWindowCommand(itsCmdNumber: CmdNumber;
itsWindow: TWindow);
æFi UMacApp.p
æT METHOD
æC ICloseWindowCommand initializes the object and associates it with a command
number. The itsCmdNumber parameter is the command number associated with a
particular menu command—in this case, the Close command, which is normally found in
an application's File menu. The command number is used in the 'cmnu' resource in
the resource description file; you will typically define a constant to represent
that number in both the resource description file and in the appropriate
interface or implementation file of the application. The itsWindow parameter
specifies the window afffected by the action of this command; it is the window
associated with the fView field initialized in TCommand.ICommand. MacApp calls this
method when the user chooses the Close item from the File menu. You never need to
call ICloseWindowCommand yourself.
æKY TCluster.DoChoice
æD PROCEDURE TCluster.DoChoice(origView: TView; itsChoice: INTEGER); OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoChoice sets the state of a cluster of radio buttons. When it receives an
mRadioHit message, this method turns off the TRadio buttons that were not selected
and turns on the new selection. The origView parameter is the original view that
received the mRadioHit message. The parameter itsChoice is an integer that
specifies whether the user clicked a button, a check box, a text string, or
another control. MacApp calls this method in response to a mouse-down event occurring
in one of the cluster's subviews.
æKY TCluster.Draw
æD PROCEDURE TCluster.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws the frame and label text for a cluster of radio buttons. The
area parameter is a QuickDraw rectangle, described in local coordinates, that
defines the part of the cluster that needs to be redrawn. You use this parameter
to optimize drawing speed. MacApp calls this method in response to an update
event occurring in one of the cluster’s subviews. You usually do not need to call
this method yourself.
æKY TCluster.Fields
æD PROCEDURE TCluster.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TCluster object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TCluster
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TCluster.Free
æD PROCEDURE TCluster.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TCluster label and then calls INHERITED
Free to release memory used by dependent structures. MacApp calls Free when a
dialog box is closed. You usually do not need to call this method yourself.
æKY TCluster.GetLabel
æD PROCEDURE TCluster.GetLabel(VAR theLabel: Str255);
æFi UDialog.p
æT METHOD
æC GetLabel returns the cluster's current label by retrieving the text string at
the address referenced by the fDataHandle field; GetLabel then stores it in
theLabel. The parameter theLabel is used to return the desired string. GetLabel is
called by TCluster.WRes when writing the TCluster portion of a 'view' resource
template. You can call it to get a TCluster object's label.
æKY TCluster.ICluster
æD PROCEDURE TCluster.ICluster(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsRsrcID, itsIndex: INTEGER);
æFi UDialog.p
æT METHOD
æC ICluster initializes the cluster and installs it in the given superview. The
fDefChoice field is set to mClusterHit. The itsSuperView parameter is the view in
which the cluster appears. The itsLocation parameter is the location of the
cluster in view coordinates. The itsSize parameter is the size of the cluster in
pixels. The itsHSizeDet and itsVSizeDet parameters determine how the view's
horizontal and vertical dimensions are calculated, respectively. Possible values
are sizeSuperView (subview is the same size as superview), sizeRelSuperView
(subview size changes an equal amount relative to the superview's size), sizePage
(view to be the size of one page), sizeFillPages (view grows to fill an exact
number of pages), sizeVariable (view size fluctuates according to
application-specific criteria), or sizeFixed (no special handling of size issues).
The itsRsrcID parameter is the integer that MacApp uses to refer to the view's
resource. The parameter itsIndex is the integer specifying which string will be
returned from the string list. You call this method when you want a cluster in your
dialog box.
æKY TCluster.IRes
æD PROCEDURE TCluster.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TCluster object from a 'view' resource template. The
fDefChoice field is set to mClusterHit. The itsDocument parameter specifies the
document affected by the cluster’s action. The itsSuperView parameter specifies the
view in which this cluster appears. The itsParams parameter is a pointer to the
portion of the 'view' resource data used to initialize this view. When the IRes
method finishes initializing the view, the method moves the pointer to the end
of this data. MacApp calls this method for each of the views created from a
'view' resource template, usually in response to a NewTemplateWindow or a
DoCreateViews call. You never need to call IRes yourself.
æKY TCluster.ReleaseLabel
æD PROCEDURE TCluster.ReleaseLabel;
æFi UDialog.p
æT METHOD
æC This method disposes of the handle to the cluster's label string. ReleaseLabel
is called by TCluster.SetLabel to dispose of the old label before setting a new
one; it is also called by TCluster.Free. You usually do not need to call this method.
æKY TCluster.ReportCurrent
æD FUNCTION TCluster.ReportCurrent: IDType;
æFi UDialog.p
æT METHOD
æC ReportCurrent returns the fIdentifier of the currently selected radio button in
a cluster. MacApp does not call this method; it is included for your
convenience. You can call this method to determine which radio button is currently
selected.
æKY TCluster.SetLabel
æD PROCEDURE TCluster.SetLabel(theLabel: Str255; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method sets the cluster's label to the given string, forcing the view to be
redrawn if requested. The parameter theLabel is the string designated as the
cluster's label. If you set the value of the redraw parameter to TRUE, the
cluster label is immediately redrawn to reflect its new value. If the value of the
redraw parameter is FALSE, then the cluster label is not redrawn even though the
new value may affect its appearance. You can set redraw to FALSE when you know
the cluster label will be redrawn eventually and you wish to avoid drawing it
twice, which makes the screen appear to flicker.
æKY TCluster.WRes
æD PROCEDURE TCluster.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TCluster portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TCluster section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TCluster.WriteRes
æD PROCEDURE TCluster.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('clus') and
class name ('TCluster') for the ‘view’ resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TCluster object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or signature.
æKY TColumnSelectCommand.ComputeAnchorCell
æD PROCEDURE TColumnSelectCommand.ComputeAnchorCell
(VAR clickedCell: GridCell); OVERRIDE;
æFi UGridView.p
æT METHOD
æC ComputeAnchorCell tracks the mouse and recalculates the first cell in a
selection that the user made while pressing the Shift key. The clickedCell parameter
is a variable that ComputeAnchorCell uses internally. ComputeAnchorCell is called
by TRCSelectCommand.TrackMouse when the user first selects a column of cells
in a TGridView object. You can call ComputeAnchorCell to determine the first
cell in a user selection in a TGridView view. However, you usually do not need to
call it yourself because MacApp intercepts mouse commands and calls this method
for you as needed.
æKY TColumnSelectCommand.ComputeNewSelection
æD PROCEDURE TColumnSelectCommand.ComputeNewSelection
(VAR clickedCell: GridCell); OVERRIDE;
æFi UGridView.p
æT METHOD
æC ComputeNewSelection first determines whether the user's selection of cells in a
TGridView view is valid, and whether it is a single- or multiple-cell
selection. If the selection is valid, ComputeNewSelection stores the selection as a
rectangle in the TGridView variable fSelections. The clickedCell parameter is a
variable that ComputeNewSelection uses internally. ComputeNewSelection is called
repeatedly by TRCSelectCommand.TrackMouse as the user moves the mouse to select
one or more columns of cells in a TGridView object. You usually do not need to
call this method yourself unless you override TGridView methods to implement
other means of selection.
æKY TColumnSelectCommand.Fields
æD PROCEDURE TColumnSelectCommand.Fields (PROCEDURE DoToField (fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TColumnSelectCommand object to
the MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TColumnSelectCommand object, performing DoToField on each one. The fieldName
parameter is the name of the field. The fieldAddr parameter is the field’s
location in memory. The fieldType parameter uses a predefined constant to tell Fields
what type of information to look for in a field. MacApp calls Fields from the
MacApp Inspector. You must override this method in your subclasses if you want
the Inspector to display your fields. Your override must call INHERITED Fields
as its last action to ensure that the inherited fields are also displayed.
æKY TColumnSelectCommand.IColumnSelectCommand
æD PROCEDURE TColumnSelectCommand.IColumnSelectCommand(itsView: TGridView;
theShiftKey, theCmdKey: BOOLEAN);
æFi UGridView.p
æT METHOD
æC IColumnSelectCommand initializes a command object and associates it with a
TGridView object. The itsView parameter is the view associated with the command
object. The parameter theShiftKey is TRUE while the Shift key is pressed. The
parameter theCmdKey is TRUE while the Command key is pressed. MacApp does not call
this method; it is included for your convenience. You can use it to initialize
TColumnSelectCommand objects.
æKY TCommand.AutoScroll
æD PROCEDURE TCommand.AutoScroll(deltaH, deltaV: VCoordinate);
æFi UMacApp.p
æT METHOD
æC AutoScroll implements automatic scrolling in the view that fScroller references.
The deltaH and deltaV parameters specify the amounts by which to offset the
coordinates of the scroller view in the view coordinate space. The deltaH
parameter specifies the horizontal offset and the deltaV parameter specifies the
vertical offset. MacApp calls AutoScroll when the mouse is being tracked and has
strayed outside of the scroller. You rarely call AutoScroll yourself. AutoScroll
accomplishes its task by calling TScroller.ScrollBy; you must override ScrollBy
if the scroll bar units are not the same as the scroller’s translation units.
æKY TCommand.Commit
æD PROCEDURE TCommand.Commit;
æFi UMacApp.p
æT METHOD
æC Commit does whatever is needed to make the effects of a command permanent. It is
an empty method; you must supply all code necessary to implement Commit for
your command object. MacApp uses Commit to implement filtered commands—commands
that do not change the document object until this method is called. For example,
you might wish to implement certain Undo and Redo methods in this way. The
Commit method is also used with commands that cannot free items until the command
can no longer be undone. You rarely call the Commit method yourself; rather, it
is called by TApplication.CommitLastCommand when the command can no longer be
undone or redone—for example, when the user chooses a new undoable command,
closes the document associated with the command, or quits the application. It is
not called if the command was left undone—that is, in the same state as after
UndoIt is invoked.
æKY TCommand.DoIt
æD PROCEDURE TCommand.DoIt;
æFi UMacApp.p
æT METHOD
æC The procedure TCommand.DoIt is an empty method; you must always override it,
supplying the code to do the action of the command. You almost never call the DoIt
method yourself; TApplication.PerformCommand calls DoIt when the user
initially chooses the command. The only likely exception to this rule is that your
RedoIt method may also call DoIt.
æKY TCommand.Fields
æD PROCEDURE TCommand.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TCommand object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TCommand
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TCommand.ICommand
æD PROCEDURE TCommand.ICommand(itsCmdNumber: CmdNumber; itsDocument: TDocument;
itsView: TView; itsScroller: TScroller);
æFi UMacApp.p
æT METHOD
æC ICommand initializes the fields of a TCommand object. The itsCmdNumber parameter
specifies which menu command the user chose. The itsDocument parameter is a
reference to the document associated with the command object. The itsView
parameter is a reference to the view associated with the command object, and the
itsScroller parameter is a reference to the scroller associated with the command
object. If your document does not require automatic scrolling, you can call
ICommand with itsView and itsScroller set to NIL. Methods of the subclasses of
TCommand call ICommand as an inherited method to initialize the base fields of a new
command object. You can use this method in a similar fashion; your
TYourCommand.IYourCommand method calls it as an inherited method to initialize the
fields your conmmand object inherits from the TCommand class.
æKY TCommand.IsDoneTracking
æD FUNCTION TCommand.IsDoneTracking: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsDoneTracking indicates whether the command object is finished tracking the
mouse. (The command object is also finished tracking if TrackMouse returns NIL).
The default method returns the result of fView.IsDoneTracking. You usually do
not need to call this method, although you still must deal with queued events if
you change the criteria for returning a value of TRUE.
æKY TCommand.IsReadyToExecute
æD FUNCTION TCommand.IsReadyToExecute: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsReadyToExecute returns a value of TRUE when the command is ready to be
executed. The default method returns the value of the fReadyToExecute field. MacApp
calls this method from TApplication.GetNextCommand as part of its
command-handling mechanism. You probably will not need to call this method. You can
override IsReadyToExecute to base the execution of the command on more sophisticated
criteria.
æKY TCommand.RedoIt
æD PROCEDURE TCommand.RedoIt;
æFi UMacApp.p
æT METHOD
æC RedoIt is an empty method; you must always override it, supplying the code to
redo the action of the DoIt command. You may implement RedoIt by restoring the
document to its previous state—its state when DoIt was originally invoked—and
then simply calling DoIt again. Thus, your implementation of RedoIt may carry out
a variety of actions, such as changing the selection, restoring text, restoring
styles, and then call TCommand.DoIt. You almost never call RedoIt yourself;
TApplication.DoMenuCommand calls your RedoIt method when the user chooses the
Undo/Redo menu item an even number of times.
æKY TCommand.TrackConstrain
æD PROCEDURE TCommand.TrackConstrain(anchorPoint, previousPoint: VPoint;
VAR nextPoint: VPoint);
æFi UMacApp.p
æT METHOD
æC TrackConstrain is an empty method; you must override it, providing code to
constrain mouse movement in any way your application requires. This method is used
only by mouse trackers. The anchorPoint parameter is the location of the mouse
pointer, in view coordinates, when the mouse button was clicked in the view. The
previousPoint parameter represents the location of the mouse when it was last
tracked. The nextPoint parameter is the current location of the mouse, in view
coordinates. Your override version of this method constrains the mouse by
changing the value of nextPoint appropriately. You usually do not call this method
yourself—instead, MacApp sends a message to TApplication.TrackMouse as the mouse
moves, and TrackMouse calls TCommand.TrackConstrain. When TrackConstrain’s
fConstrainsMouse field is TRUE, mouse movement is constrained. The default value
of fConstrainsMouse is FALSE. (For further information on mouse trackers, see
the discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TCommand.TrackFeedback
æD PROCEDURE TCommand.TrackFeedback(anchorPoint, nextPoint: VPoint; turnItOn,
mouseDidMove: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC TrackFeedback provides onscreen feedback for the user while the mouse is being
tracked (that is, while the mouse button is pressed and a mouse-tracker object
exists). The default version provides “rubber band” feedback: a dotted-line box
between the mouse pointer's position when the mouse button was first pressed
and its current position. The anchorPoint parameter is the position, in view
coordinates, of the mouse pointer when the mouse button was pressed. The nextPoint
parameter is the mouse pointer's current position, described in view
coordinates. The value of the turnItOn parameter is TRUE if the feedback is to be
turned on. The value of the mouseDidMove parameter is TRUE if the mouse moved more
than the hysteresis value since the last time TrackFeedback was called. (MacApp
uses the hysteresis value, supplied by TApplication.TrackMouse, to determine if
multiple mouse clicks are close enough on the screen to be considered part of a
double or triple click.) You rarely call this method
yourself—TApplication.TrackMouse calls TCommand.TrackFeedback as needed when MacApp
intercepts mouse-down events. However, you can override this method to provide other
kinds of feedback while tracking the mouse. (For further discussion of mouse trackers,
see the discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TCommand.TrackMouse
æD FUNCTION TCommand.TrackMouse(aTrackPhase: TrackPhase; VAR anchorPoint,
previousPoint, nextPoint: VPoint; mouseDidMove: BOOLEAN): TCommand;
æFi UMacApp.p
æT METHOD
æC TrackMouse allows you to carry out any actions (other than feedback or mouse
constraint) that depend on the movement of the mouse or on the track phase.
Although applications may sometimes return a different mouse-tracker object,
TrackMouse usually returns SELF. The aTrackPhase parameter describes the current phase
of the mouse-tracking process. MacApp sets its value to trackPress when the
mouse button is first pressed. When the mouse has moved more than the hysteresis
value since the last time TrackFeedback was called, MacApp sets the value of the
aTrackPhase parameter to trackMove. When the mouse button is released, MacApp
sets aTrackPhase to trackRelease. When aTrackPhase is set to trackPress, all
three points (anchorPoint, previousPoint, and nextPoint) have the same value.
When aTrackPhase is set to trackRelease, the nextPoint parameter contains the
coordinates of the location of the mouse-up event. The anchorPoint parameter is the
position of the mouse pointer, in view coordinates, when the mouse button was
first pressed. If you change this value, the new value is passed to you in the
parameter aTrackPhase the next time TrackMouse is called. The previousPoint
parameter is the position, in view coordinates, of the mouse pointer the last time
TrackMouse was called. The nextPoint parameter is the current position of the
mouse pointer, in view coordinates. Although you can change the value of
nextPoint yourself, it is preferable to use TCommand.TrackConstrain to limit mouse
movement. The value of nextPoint at the time TrackMouse exits will be passed to
you as the value of previousPoint the next time TrackMouse is called. MacApp
sets the value of the mouseDidMove parameter to TRUE if the mouse moved since the
last time TCommand.TrackFeedback was called. However, SELF.TrackConstrain may
set the mouse coordinates back to values as if no movement had occurred; thus,
the mouse has not necessarily moved the first time TrackMouse is called with
aTrackPhase set to trackMove. Test the value of mouseDidMove to determine whether
you should consider the mouse to have moved. The mouseDidMove parameter will
have the value TRUE if aTrackPhase has a value of either trackPress or
trackRelease; otherwise, its value is TRUE if nextPoint and previousPoint are not equal.
You never call TCommand.TrackMouse yourself; rather, TApplication.TrackMouse
calls it when the mouse button is first pressed, as the mouse moves, and when the
mouse button is released. You often override this method to take
application-specific action. (For further information on mouse trackers, see the
discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TCommand.UndoIt
æD PROCEDURE TCommand.UndoIt;
æFi UMacApp.p
æT METHOD
æC UndoIt, when overridden, reverses the action of the command DoIt and is an empty
method; you must always override it, supplying the code to undo the action of
DoIt. You usually do not call UndoIt yourself; TApplication.DoMenuCommand calls
UndoIt when the user chooses the Undo menu item an odd number of times.
æKY TCommandList.Compare
æD FUNCTION TCommandList.Compare(item1, item2: TObject): INTEGER; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC The Compare method compares the fPriority field of two command objects in a
list. Compare returns one of the constants kItem1LessThanItem2, kItem1EqualItem2,
or kItem1GreaterThanItem2, according to whether the value of the fPriority field
of item1 is less than, equal to, or greater than the value of the fPriority
field of item2. MacApp calls TCommandList.Compare from TCommandList.Insert to
determine the position in which to place a new command when inserting it in the
command queue. You usually do not need to call this method yourself.
æKY TCommandList.Fields
æD PROCEDURE TCommandList.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TCommandList object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TCommandList object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TCommandList.ICommandList
æD PROCEDURE TCommandList.ICommandList;
æFi UMacApp.p
æT METHOD
æC ICommandList initializes a TCommandList object. MacApp calls ICommandList when
initializing the command-handling mechanism. You usually do not need to call
this method yourself.
æKY TCommandList.Insert
æD PROCEDURE TCommandList.Insert(item: TObject); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC The Insert method inserts a command object in the command queue, positioning the
object based on the value of its fPriority field. Commands are ranked from
highest to lowest priority; new commands are inserted in the list after the last
item having equal priority. Thus, commands are executed with regard to priority
and the arrival sequence within Compare ordering. This method guarantees
insertion even under low-memory conditions because it allocates temporary memory
rather than permanent memory. The item parameter is the command object to be
inserted in the list. Insert is internal to the command-handling mechanism in MacApp;
you usually do not need to call or override it yourself. This method overrides
TSortedList.Insert because the command queue is not guaranteed to be in sorted
order, as the TSortedList version of Insert assumes it to be.
æKY TControl.ComputeSize
æD PROCEDURE TControl.ComputeSize(VAR newSize: VPoint); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC ComputeSize adjusts the size of a TView object. This override adjusts the
control's insets appropriately using the result returned by TView.ComputeSize as a
starting value. The newSize parameter is the size, in view coordinates, of the
new view. The newSize parameter is set by the method TView.ComputeSize.
ComputeSize is called when the view or superview containing the control changes size.
This method may also be called as a result of a change in the size of the
control's label. You usually do not need to call this method yourself.
æKY TControl.ContainsMouse
æD FUNCTION TControl.ContainsMouse(theMouse: VPoint): BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC ContainsMouse returns TRUE only if the mouse pointer is in the control’s active
area. The parameter theMouse is the position of the mouse in view coordinates.
ContainsMouse is called by TControl.TrackMouse during the trackMove and
trackRelease phases. If ContainsMouse returns the value TRUE during the trackMove
phase, the control is highlighted and redrawn to reflect the effects of tracking
the mouse while it is in the control's active area. If ContainsMouse also returns
the value TRUE during the trackRelease phase, TControl.TrackMouse calls
SELF.DoChoice to handle the mouse up event in the control's active area. You can call
ContainsMouse yourself to find out if the mouse pointer is within the
boundaries of a view.
æKY TControl.ControlArea
æD PROCEDURE TControl.ControlArea(VAR theArea: Rect);
æFi UMacApp.p
æT METHOD
æC ControlArea returns the view's active control area as a QuickDraw rectangle. The
parameter theArea is the rectangle defining the control's active area.
ControlArea is called by MacApp when it requires the location of a control's active
area. Situations in which this information is required include tracking the mouse
when it is in a control (TControl.ContainsMouse), drawing or highlighting
controls (TPopup.CalcLabelRect, TPopup.CalcMenuRect, TControl.Dim, TCluster.Draw,
TIcon.Draw, TPattern.Draw, TPicture.Draw, TPopup.Draw, TStaticText.Draw,
TControl.Hilite), initializing controls (TButton.IRes, TCheckBox.IRes, TRadio.IRes,
TScrollBar.IRes), and drawing certain text views (TEditText.RestartEdit,
TEditText.SetText, TStaticText.SetText). You can call ControlArea yourself to
determine the location of a control's active area.
æKY TControl.Dim
æD PROCEDURE TControl.Dim;
æFi UMacApp.p
æT METHOD
æC Dim creates the control’s dim effect by painting a gray pattern over the
control; it can be overridden to change the way the dim effect is drawn for a control.
Dim is called by TControl.Draw when the value of fDimmed is TRUE. Rather than
calling this method yourself, you should call TControl.DimState to draw a
control's dim effect when the control is disabled; DimState changes the control's
dim state only when necessary to match the state you specify, and allows you to
specify whether the control is to be redrawn immediately.
æKY TControl.DimState
æD PROCEDURE TControl.DimState(state, redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DimState sets the state of a control's appearance on the screen, redrawing it if
requested; this method implements logic to change the control's dim state only
when necessary to match the state you specify. You can set the state parameter
to TRUE to dim the control. You can set the redraw parameter to TRUE if the
change in appearance is to be redrawn immediately. You can set redraw to FALSE
when you know the control will be redrawn eventually and you wish to avoid
drawing it twice, which makes the screen appear to flicker. MacApp never calls
DimState; it is included for your convenience. You can use this method to set a
control's dim state and redraw it on request.
æKY TControl.DoMouseCommand
æD FUNCTION TControl.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMouseCommand returns a TControlTracker object to track the mouse in the active
area of a TControl view. The parameter theMouse is the mouse pointer’s current
location, described in view coordinates. The info parameter is the event
record of the mouse-down event that caused DoMouseCommand to be called. The
hysteresis parameter is a point that represents the horizontal and vertical distance
the mouse can travel between clicks and still be considered to be at the same
location. MacApp uses this parameter to determine whether a double click has
occurred or if a control has moved. DoMouseCommand is called by
TView.HandleMouseDown when MacApp receives a mouse-down event in a TControl object.
You usually do not need to call this method yourself.
æKY TControl.Draw
æD PROCEDURE TControl.Draw(area: Rect); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method draws the control’s adornment, calls its Dim method if the value of
the control’s fDimmed field is TRUE, and calls its Hilite method if the value
of the control’s fHilite field is TRUE. The area parameter is a QuickDraw
rectangle, described in local coordinates, that defines the part of the control that
needs to be redrawn. You use this parameter to optimize drawing speed. Draw is
called as an inherited method in the Draw methods of the following subclasses
of TControl: TCluster, TEditText, TStaticText, TIcon, TPattern, TPopup, and
TPicture. You can do the same in your methods that draw TControl objects, or
whenever you need the services that this particular Draw method provides.
æKY TControl.Fields
æD PROCEDURE TControl.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TControl object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TControl
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TControl.Flash
æD PROCEDURE TControl.Flash;
æFi UMacApp.p
æT METHOD
æC This method flashes the control by calling HiliteState twice. Flash is called by
TDialogView.DismissDialog when the user clicks the control that dismisses the
dialog box. You can call it to make TControl controls flash.
æKY TControl.Focus
æD FUNCTION TControl.Focus: BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This overridden version of Focus first checks that the view has been focused by
TView.Focus, then sets the current port’s text style and returns the value
TRUE. Focus returns the value FALSE if the view is not focused. MacApp calls Focus
prior to doing almost anything to a control or a view, including calling
methods that affect the controls themselves (remember, controls are actually views);
tracking the mouse in a control; and validating, drawing and resizing views.
You should call focus in any TControl method (except Draw) that draws in the
view. You should not change the behavior of Focus.
æKY TControl.Hilite
æD PROCEDURE TControl.Hilite;
æFi UMacApp.p
æT METHOD
æC Hilite creates the control’s highlighting effect. Since this method is
responsible for both highlighting and unhighlighting, it can examine the fHilite field
to see whether it should highlight or unhighlight. The standard behavior is to
simply invert the control, but you can override this method to change the way
highlighting is drawn. Hilite is called from TControl.HiliteState to highlight or
unhighlight the control, and from TControl.Draw when the value of the
control’s fHilite field is TRUE. Rather than calling Hilite when you wish to highlight
or unhighlight a control, it is preferable to call HiliteState. The HiliteState
method changes the control's highlight state only when necessary to match the
state you specify, and allows you to specify whether the control is to be
redrawn immediately.
æKY TControl.HiliteState
æD PROCEDURE TControl.HiliteState(state, redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the highlight state and appearance of the control. You can set
the state parameter to TRUE if you want to highlight the control. You can set
the value of the redraw parameter to TRUE if you want the change in the
control's appearance to be redrawn immediately. You can set redraw to FALSE when you
know the control will be redrawn eventually and you wish to avoid drawing it
twice, which makes the screen appear to flicker or flash. TControl.TrackMouse calls
HiliteState to highlight the control when the user clicks it. You can call
this method to highlight or dim a control.
æKY TControl.IControl
æD PROCEDURE TControl.IControl(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer);
æFi UMacApp.p
æT METHOD
æC IControl initializes a TControl object and associates it with its superview. The
itsSuperView parameter is the superview of the view associated with the
control. The itsLocation parameter is the location of the control in local view
coordinates. The itsSize parameter is the size of the control in pixels. The
itsHSizeDet and itsVSizeDet parameters determine how the view's horizontal and
vertical dimensions are calculated, respectively. Possible values are sizeSuperView
(subview is the same size as superview), sizeRelSuperView (subview size changes
an equal amount relative to the superview's size), sizePage (view is to be the
size of one page), sizeFillPages (view grows to fill an exact number of pages),
sizeVariable (view size fluctuates according to application-specific criteria),
or sizeFixed (no special handling of size issues). IControl is called by the
initialization method of each of TControl's immediate subclasses. You can use it
to initialize TControl objects.
æKY TControl.Inset
æD PROCEDURE TControl.Inset(dh, dv: INTEGER; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Inset decreases the active area of the control by the number of pixels you
specify. The dh parameter is the horizontal inset in pixels. The dv parameter is the
vertical inset in pixels. If the value of the redraw parameter is TRUE, then
the control is immediately redrawn with its new insets. If the value of the
redraw parameter is FALSE, then the control is not redrawn, even though the new
insets may affect its appearance. You can set redraw to FALSE when you know the
control will be redrawn eventually and you wish to avoid drawing it twice, which
makes the screen appear to flicker. TEditText.IEditText calls Inset when
initializing a new TEditText object. You can call this method when you want to
decrease the active area of the control (for example, when your control has a large
border). This method performs the same task as TControl.SetInset, but uses a
different set of parameters. You can use either method to set the active area of
the control, depending on how you want to accomplish that task. Inset accepts
change values as its parameters; SetInset accepts a rectangle that is used to
define the new active area.
æKY TControl.InstallColor
æD PROCEDURE TControl.InstallColor(theColor: RGBColor; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the color of the control’s text to the color you specify. The
color and other information about the control’s text is stored in the fTextStyle
field. The parameter theColor is the color in which the text is to be drawn.
If the value of the redraw parameter is TRUE, the control is redrawn immediately
with its new text color. If the value of the redraw parameter is FALSE, then
the control is not redrawn, even though the new text color may affect its
appearance. You can set redraw to FALSE when you know the control will be redrawn
eventually and you wish to avoid drawing it twice, which makes the screen appear
to flicker. MacApp does not call this method; it is provided for your
convenience. You can call this method to set the color of the control's text.
æKY TControl.InstallTextStyle
æD PROCEDURE TControl.InstallTextStyle(theTextStyle: TextStyle; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the text style of the control to the text style you specify.
The parameter theTextStyle is the control's text style. If the value of the
redraw parameter is TRUE, the control is redrawn immediately with its new text
style. If the value of the redraw parameter is FALSE, then the control is not
redrawn, even though the new text style may affect its appearance. You can set redraw
to FALSE when you know the control will be redrawn eventually and you wish to
avoid drawing it twice, which makes the screen appear to flicker. MacApp does
not call this method; it is provided for your convenience. You can use it to set
the font, style, size and color of the control's label.
æKY TControl.IRes
æD PROCEDURE TControl.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC IRes initializes a TControl object from a 'view' resource template. The
fDefChoice field is set to mOKHit. The itsDocument parameter specifies the document
affected by the control’s action. The itsSuperView parameter specifies the view in
which this control appears. The itsParams parameter is a pointer to the
portion of the 'view' resource data used to initialize this view. When the IRes
method finishes initializing the view, the method moves the pointer to the end of
this data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a DoCreateViews
call. You never need to call IRes yourself.
æKY TControl.IsDimmed
æD FUNCTION TControl.IsDimmed: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC This method returns the value TRUE if the control is currently dimmed. The
IsDimmed method is called by TControl.IRes and TControl.WRes to obtain an initial
dim state for new TControl objects. You can use this method in a similar fashion.
æKY TControl.Resize
æD PROCEDURE TControl.Resize(width, height: VCoordinate;
invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method resizes the TControl view, redrawing if requested. This method
overrides TView.Resize, which redraws only the part of the view that has changed
size; the override redraws the entire TControl view. The width parameter is the
view’s new horizontal dimension, expressed in local view coordinates. The height
parameter is the view’s new vertical dimension, expressed in local view
coordinates. If you set the value of the invalidate parameter to TRUE, the entire view
is invalidated, forcing it to be redrawn in the update process. When you know
the view will be redrawn eventually and wish to avoid drawing it twice—which
makes the screen appear to flash—you can set the invalidate parameter to FALSE.
MacApp calls Resize when something happens that may affect the size of the view
containing the control. Resize is called by TView.SuperViewChangedSize whenever
any superview of the control’s view changes size. Resize is also called by
TControl.Inset and TControl.SetInset because changing the appearance of a control
may necessitate resizing its view. Also, TCtlMgr.Resize and TEditText.Resize
both accomplish their respective tasks in part by calling INHERITED Resize. You
can use Resize in a similar fashion.
æKY TControl.SetInset
æD PROCEDURE TControl.SetInset(newInset: Rect; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the control’s inset to that specified by the dimensions of the
rectangle it accepts as a parameter. The newInset parameter is a rectangle
defining the new active area of the control. If the value of the redraw parameter
is TRUE, the control is redrawn immediately with its new insets. If the value of
the redraw parameter is FALSE, then the control is not redrawn, even though
the new insets may affect its appearance. You can set redraw to FALSE when you
know the control will be redrawn eventually and you wish to avoid drawing it
twice, which makes the screen appear to flicker. You can call this method when you
want to decrease the active area of the control (for example, when your control
has a large border). This method performs the same task as TControl.Inset, but
uses a different set of parameters. You can use either method to set the
active area of the control, depending on how you want to accomplish that task. Inset
accepts change values as its parameters; SetInset accepts a rectangle that is
used to define the new active area.
æKY TControl.TrackFeedback
æD PROCEDURE TControl.TrackFeedback(anchorPoint, nextPoint: VPoint; turnItOn,
mouseDidMove: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC TrackFeedback is overriden to be an empty method. This blocks the default
behavior of TView.TrackFeedback and allows TControl.TrackMouse to provide the default
behavior for controls. Because it is an empty method, TrackFeedback ignores
its parameters. If you were to write your own version of this method, you could
use them as the other TrackFeedback methods do: The anchorPoint parameter is the
position of the mouse pointer, in view coordinates, when the mouse button was
pressed. The nextPoint parameter is the mouse pointer’s current position,
described in view coordinates. The value of the turnItOn parameter must be TRUE if
the feedback is to be enabled. The value of the mouseDidMove parameter must be
TRUE if the mouse moved more than the hysteresis value since the last time
TrackFeedback was called. (MacApp uses the hysteresis value to determine if multiple
mouse clicks are close enough on the screen to be considered part of a double
or triple click.) MacApp does not call TControl.TrackFeedback, because mouse
tracking for controls is implemented in the TControl.TrackMouse method.
æKY TControl.TrackMouse
æD PROCEDURE TControl.TrackMouse(aTrackPhase: TrackPhase; VAR anchorPoint,
previousPoint, nextPoint: VPoint; mouseDidMove: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC TrackMouse carries out any mouse-tracking activity required by the control,
other than that implemented in TrackConstrain and TrackFeedback. The default
TrackMouse method highlights the control when the user clicks the control,
unhighlights the control when the user clicks elsewhere, and calls DoChoice when the
user releases the mouse button. The aTrackPhase parameter describes the current
phase of the mouse-tracking process. MacApp sets its value to trackPress when the
mouse button is first pressed. When the mouse has moved more than the
hysteresis value since the last time TrackFeedback was called, MacApp sets aTrackPhase
to trackMove. When the mouse button is released, MacApp sets aTrackPhase to
trackRelease. When aTrackPhase is set to trackPress, all three points (anchorPoint,
previousPoint, and nextPoint) have the same value. When aTrackPhase is set to
trackRelease, the nextPoint parameter specifies the coordinate of the location
of the mouse-up event. The anchorPoint parameter is the position of the mouse
pointer, in view coordinates, when the mouse button was pressed. If you change
this value, the new value is passed to you the next time TrackMouse is called.
The previousPoint parameter is the position, in view coordinates, of the mouse
pointer the last time TrackMouse method was called. The nextPoint parameter is
the current position of the mouse pointer, in view coordinates. Although you can
change the value of nextPoint yourself, it is preferable to use
TCommand.TrackConstrain to limit mouse movement. The value of nextPoint at the time
TrackMouse exits is passed to you as the value of previousPoint the next time
TrackMouse is called. The mouseDidMove parameter is set to TRUE if the mouse moved
since the last time TControl.TrackFeedback was called. However, SELF.TrackConstrain
may set the mouse coordinates back to values as if no movement had occurred;
thus, you should not necessarily consider the mouse to have moved the first time
TrackMouse is called with aTrackPhase set to trackMove. Instead, test the value
of mouseDidMove to determine whether you should consider the mouse to have
moved. The mouseDidMove parameter has the value TRUE if aTrackPhase has a value of
either trackPress or trackRelease; otherwise, it has the value TRUE if
nextPoint and previousPoint are not equal. You never call TControl.TrackMouse yourself;
rather, TApplication.TrackMouse calls it when the mouse button is first
pressed, as the mouse moves, and when the mouse button is released. You often
override this method to take application-specific action. (For further discussion of
mouse trackers, see the section on handling mouse events in the MacApp 2.0
Cookbook.)
æKY TControl.Validate
æD FUNCTION TControl.Validate: LONGINT;
æFi UMacApp.p
æT METHOD
æC Validate allows subclasses of TControl to inherit a method that returns noErr if
the control’s contents are valid. Validation generally applies to controls
that accept keyboard entry, but it is not necessarily restricted as such. This
method’s default behavior is to return noErr; you must override it to implement
any special validation criteria your control may require. MacApp calls this
method as an inherited method from TEditText.Validate to obtain an initial value for
its result before performing other tests. You can use this method or your
override version of it in a similar fashion.
æKY TControl.WRes
æD PROCEDURE TControl.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WRes writes the TControl portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TControl section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TControl.WriteRes
æD PROCEDURE TControl.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('cntl') and
class name ('TControl') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TControl object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or signature.
æKY TControlTracker.Fields
æD PROCEDURE TControlTracker.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TControlTracker object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TControlTracker object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what type
of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TControlTracker.IControlTracker
æD PROCEDURE TControlTracker.IControlTracker(theControl: TControl);
æFi UMacApp.p
æT METHOD
æC IControlTracker initializes the fields of a TControlTracker command object. The
main characteristic of a TControlTracker object is implemented in this method
by setting the values of two fields inherited from the TNoChangesCommand class.
The inherited field TNoChangesCommand.fTrackNonMovement is set to TRUE and the
inherited field TNoChangesCommand.fViewConstrain is set to FALSE. This
particular combination of instance variables causes TControlTracker objects to always
track the mouse—whether it moves or not—without constraining it to the control's
view. As a result, TControlTracker objects easily implement automatic
highlighting of controls whenever the mouse pointer should stray within the control's
active area. The parameter theControl is the control associated with the command
object. MacApp calls IControlTracker when a new mouse tracker is created. You
can call this method when you want to initialize a newly-created instance of
TControlTracker. Your override version of this method must include all code
needed to initialize fields that are unique to your command object.
æKY TCtlMgr.BeInPort
æD PROCEDURE TCtlMgr.BeInPort(itsPort: GrafPtr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC BeInPort associates the control with a specified grafPort. The itsPort parameter
is a pointer to the grafPort associated with the control. If no Control
Manager control is associated with the TCtlMgr object, BeInPort sets the grafPort to
gWorkPort. BeInPort is called by TView.AddSubView to associate the current
grafPort with the graphics operations being performed in the new subview (such as
drawing the control). It is also called by TView.BeInPort when a control is
added to a TView subview. You can use this method in a similar fashion.
æKY TCtlMgr.CreateCMgrControl
æD PROCEDURE TCtlMgr.CreateCMgrControl(itsBounds: Rect; itsTitle: Str255; itsValue,
itsMin, itsMax, itsProcID: INTEGER);
æFi UMacApp.p
æT METHOD
æC CreateCMgrControl creates a new control that behaves like one governed by the
Macintosh Control Manager. The itsBounds parameter is the rectangle defining the
control's active area in the local coordinates of the grafPort currently
associated with the control; for information on setting an appropriate value for the
itsBounds parameter, see the discussion of the Toolbox function NewControl in
Inside Macintosh, Volume 1. The itsTitle parameter is a string containing the
name that appears on the control itself. The itsValue parameter is the initial
value of the control setting. The itsMin parameter is the minimum allowable value
of the control setting. The itsMax parameter is the maximum allowable value of
the control setting. The itsProcID parameter is a unique integer identifying
the procedure that implements the control's function, as defined in the Control
Manager chapter of Inside Macintosh, Volume 1. CreateCMgrControl is a utility
method that is called by the IRes methods of the TCtlMgr subclasses TButton,
TCheckBox, TRadio, and TScrollBar when initializing their respective control
objects. It is also called by TCtlMgr.ICtlMgr when initializing a new TCtlMgr
object. You usually do not need to call it yourself.
æKY TCtlMgr.DimState
æD PROCEDURE TCtlMgr.DimState(state, redraw: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DimState is overridden to set the state of a control's appearance on the screen,
redrawing the control if requested. You can set the state parameter to TRUE to
dim the control; this method does nothing if the state parameter matches the
value of the control's fDimmed field. You can set the redraw parameter to TRUE
if the change in appearance is to be redrawn immediately. You can set redraw to
FALSE when you know the control will be redrawn eventually and you wish to
avoid drawing it twice, which makes the screen appear to flicker. MacApp never
calls DimState; it is included for your convenience. You can use this method to set
a control's dim state and redraw it on request.
æKY TCtlMgr.DoMouseCommand
æD FUNCTION TCtlMgr.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMouseCommand performs the appropriate actions to process a mouse click in a
TCtlMgr view. This method tracks the mouse while it is in the control and calls
DoChoice to allow any of the control’s superviews to respond to the choice code.
The default version of this method returns NIL. The parameter theMouse is the
mouse pointer’s current location, described in view coordinates. The info
parameter is the event record of the mouse-down event that caused DoMouseCommand to
be called. The hysteresis parameter is a point that represents the horizontal
and vertical distance the mouse can travel between clicks and still be
considered to be at the same location. MacApp uses this parameter to determine whether
a double click has occurred or if a control has moved. DoMouseCommand is called
by TView.HandleMouseDown when the user clicks in the active area of a TControl
object. You usually do not need to call this method yourself.
æKY TCtlMgr.Draw
æD PROCEDURE TCtlMgr.Draw(area: Rect); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method draws the image of a TCtlMgr object on the screen if the control is
visible. If the current configuration has a 128K ROM (version $75, used in the
Macintosh 512K enhanced computer and later Macintosh models) or a newer ROM,
this method uses the Control Manager routine Draw1Control to draw the control; if
the current configuration has a 64K ROM, this method draws the control by
setting the value of the contrlVis field to 0 and calling the Control Manager
routine ShowControl. The contrlOwner field associated with the control is
temporarily set to the current port in case the control is being printed. The area
parameter is a QuickDraw rectangle, described in local coordinates, that defines the
part of the control that needs to be redrawn. You use this parameter to
optimize drawing speed. Draw is called as an inherited method by the Draw methods of
TScrollBar and TSScrollBar. You usually do not need to call Draw yourself.
æKY TCtlMgr.Fields
æD PROCEDURE TCtlMgr.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TCtlMgr object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TCtlMgr
object, performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TCtlMgr.Free
æD PROCEDURE TCtlMgr.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free releases the memory used by the TCtlMgr object and then calls INHERITED
Free. MacApp calls Free when a control is closed. You usually do not need to call
this method yourself.
æKY TCtlMgr.GetLongMax
æD FUNCTION TCtlMgr.GetLongMax: VCoordinate;
æFi UMacApp.p
æT METHOD
æC GetLongMax returns a numeric value that represents the control’s maximum
allowable value, described in view coordinate units. MacApp does not call this method;
however, you can call it to obtain a TCtlMgr control's maximum value. It is
preferable to call this method, which returns a 32-bit value, rather than
TCtlMgr.GetMax.
æKY TCtlMgr.GetLongMin
æD FUNCTION TCtlMgr.GetLongMin: VCoordinate;
æFi UMacApp.p
æT METHOD
æC GetLongMin returns a numeric value that represents the control’s minimum
allowable value, described in view coordinate units. MacApp does not call this method;
however, you can call it to obtain a TCtlMgr control's minimum value. It is
preferable to call this method, which returns a 32-bit value, rather than
TCtlMgr.GetMin.
æKY TCtlMgr.GetLongVal
æD FUNCTION TCtlMgr.GetLongVal: VCoordinate;
æFi UMacApp.p
æT METHOD
æC GetLongVal returns a numeric value that represents the control’s current value,
described in view coordinate units. MacApp calls GetLongVal to get the current
setting of a TCheckBox or TRadio control; you also can call it to obtain a
TCtlMgr control's current setting. It is preferable to call this method, which
returns a 32-bit value, rather than TCtlMgr.GetVal.
æKY TCtlMgr.GetMax
æD FUNCTION TCtlMgr.GetMax: INTEGER;
æFi UMacApp.p
æT METHOD
æC GetMax returns the maximum allowable value of the control referenced by the
fCMgrControl field. GetMax is called by TScrollBar.DoMouseCommand and
TSScrollBar.DoMouseCommand. Rather than calling GetMax to obtain a TCtlMgr control's
maximum value, it is preferable that you use the method TCtlMgr.GetLongMax, which
returns a 32-bit value.
æKY TCtlMgr.GetMin
æD FUNCTION TCtlMgr.GetMin: INTEGER;
æFi UMacApp.p
æT METHOD
æC GetMin returns minimum allowable value of the control referenced by the
fCMgrControl field. Rather than calling GetMin to obtain a TCtlMgr control's minimum
value, it is preferable that you use the method TCtlMgr.GetLongMin, which returns
a 32-bit value.
æKY TCtlMgr.GetText
æD PROCEDURE TCtlMgr.GetText(VAR theText: Str255);
æFi UMacApp.p
æT METHOD
æC GetText retrieves the current text to be drawn as the control’s label. When this
method returns, the parameter theText stores the text string that this method
retrieves. MacApp calls GetText from the WRes methods of TButton, TCheckBox,
and TRadio when writing the 'view' resource template that can be used to create
these objects. You can call this method to get a TCtlMgr control’s label text.
æKY TCtlMgr.GetVal
æD FUNCTION TCtlMgr.GetVal: INTEGER;
æFi UMacApp.p
æT METHOD
æC GetVal returns the current value of the control referenced by the fCMgrControl
field. GetVal is called by TScrollBar.DoMouseCommand,
TSScrollBar.DoMouseCommand, TCheckBox.IsOn, and TRadio.IsOn.Rather than calling GetVal
to obtain a TCtlMgr control's current value, it is preferable that you use the method
TCtlMgr.GetLongVal, which returns a 32-bit value.
æKY TCtlMgr.HiliteState
æD PROCEDURE TCtlMgr.HiliteState(state, redraw: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC HiliteState highlights the control by calling the Control Manager routine
HiliteControl. This has the effect of highlighting the control when the user clicks
in the control. The value of the state parameter is TRUE if the control is
highlighted. The value of the redraw parameter is TRUE if the change in appearance
is to be redrawn immediately.
æKY TCtlMgr.ICtlMgr
æD PROCEDURE TCtlMgr.ICtlMgr(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsTitle: Str255; itsVal, itsMin, itsMax,
itsProcID: INTEGER);
æFi UMacApp.p
æT METHOD
æC ICtlMgr initializes a TCtlMgr object and associates it with its superview. It
calls IControl to initialize its inherited data, and then calls CreateCMgrControl
to create the Control Manager control. The itsSuperView parameter is the view
that contains the control. The itsLocation parameter is the location of the
control in local view coordinates. The itsSize parameter is the size of the
control in pixels. The itsHSizeDet and itsVSizeDet parameters determine how the
view's horizontal and vertical dimensions are calculated, respectively. Possible
values are sizeSuperView (subview is the same size as superview), sizeRelSuperView
(subview size changes an equal amount relative to the superview's size),
sizePage (view is to be the size of one page), sizeFillPages (view grows to fill an
exact number of pages), sizeVariable (view size fluctuates according to
application-specific criteria), or sizeFixed (no special handling of size issues). The
itsTitle parameter is a string containing the name that appears on the control
itself. The itsVal parameter is the initial value of the control setting. The
itsMin parameter is the minimum allowable value of the control setting. The
itsMax parameter is the maximum allowable value of the control setting. The
itsProcID parameter is a unique integer identifying the procedure that implements
this control's function. ICtlMgr is called by the initialization methods of each
of TCtlMgr's immediate subclasses. You can use it to initialize TCtlMgr objects.
æKY TCtlMgr.IRes
æD PROCEDURE TCtlMgr.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC IRes initializes a TCtlMgr object from a 'view' resource template. The
fDefChoice field is set to mOKHit. The itsDocument parameter specifies the document
associated with this control. The itsSuperView parameter specifies the view in
which this control appears. The itsParams parameter is a pointer to the portion of
the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a DoCreateViews
call. You never need to call IRes yourself.
æKY TCtlMgr.IsCMgrVisible
æD FUNCTION TCtlMgr.IsCMgrVisible: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsCMgrVisible returns the value TRUE if the TCtlMgr control is visible.
IsCMgrVisible is called by several methods, generally to determine whether they should
redraw the control. These methods are TCtlMgr.Draw, TSScrollBar.Draw,
TScroller.Resize, and TCtlMgr.WhileFocused. You can use it in a similar fashion.
æKY TCtlMgr.Resize
æD PROCEDURE TCtlMgr.Resize(width, height: VCoordinate; invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method resizes a TCtlMgr view, redrawing it if requested. The width
parameter is the view’s new horizontal dimension, expressed in local view coordinates.
The height parameter is the view’s new vertical dimension, expressed in local
view coordinates. If you set the value of the invalidate parameter to TRUE, the
view is invalidated, forcing it to be redrawn in the update process. When you
know the view will be redrawn eventually and wish to avoid drawing it
twice—which makes the screen appear to flash—you can set the invalidate parameter to
FALSE. MacApp calls Resize from TScroller.AdjustScrollBars to change the size of
the scroll bars associated with a scroller. You can call it to resize any
TCtlMgr view, such as buttons, check boxes, or radio buttons.
æKY TCtlMgr.SetCMgrVisibility
æD PROCEDURE TCtlMgr.SetCMgrVisibility(beVisible: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetCMgrVisibility sets the visibility of the control according to the value of
the beVisible parameter; this method sets the value of the contrlVis field of
the control specified by fCMgrControl - it does not redraw the control. If the
value of the beVisible parameter is TRUE, SetCMgrVisibility sets contrlVis to
255; otherwise, it sets contrlVis to 0. SetCMgrVisibility is called by
TCtlMgr.CreateCMgrControl, TSScrollBar.IRes, and TSScrollBar.ISScrollBar, when
creating or initializing a TCtlMgr control. SetCMgrVisibility is also called by
TCtlMgr.BeInPort, TSScrollBar.BeInPort, TCtlMgr.Draw, TScroller.Resize, and
TCtlMgr.WhileFocused when performing graphics operations on the control or its port.
You can use it in a similar fashion.
æKY TCtlMgr.SetLongMax
æD PROCEDURE TCtlMgr.SetLongMax(itsMax: VCoordinate; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetLongMax sets the control’s maximum allowable value and adjusts the value of
the fBitsToShift field; this method also redraws the control if requested to do
so. It scales the value of itsMax to a 16-bit value and then sets the fLongMax
field to the value of itsMax. The itsMax parameter is the maximum value to
which the control can be set. If the value of the redraw parameter is TRUE, then
the control is immediately redrawn to reflect its new maximum. If the value of
the redraw parameter is FALSE, then the control is not redrawn, even though the
new value may affect its appearance. You can set redraw to FALSE when you know
the control will be redrawn eventually and you wish to avoid drawing it twice,
which makes the screen appear to flicker. SetLongMax is called by
TScrollBar.SetLongValues and by TScroller.SetScrollLimits. You can call SetLongMax to
set the maximum value of any control that has a 32-bit range.
æKY TCtlMgr.SetLongMin
æD PROCEDURE TCtlMgr.SetLongMin(itsMin: VCoordinate; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetLongMin sets the control’s minimum allowable value; this method also redraws
the control if requested to do so. It scales itsMin to a 16-bit value and then
sets fLongMin to that value. The itsMin parameter is the minimum value to which
the control can be set. If the value of the redraw parameter is TRUE, then the
control is immediately redrawn to reflect its new value. If the value of the
redraw parameter is FALSE, then the control is not redrawn, even though the new
minimum may affect its appearance. You can set redraw to FALSE when you know
the control will be redrawn eventually and you wish to avoid drawing it twice,
which makes the screen appear to flicker. SetLongMin is called by
TScrollBar.SetLongValues. You can call SetLongMin to set the minimum value of any
control that has a 32-bit range; before calling SetLongMin you should first call
SetLongMax to allow that method to adjust the value of the fBitsToShift field.
æKY TCtlMgr.SetLongVal
æD PROCEDURE TCtlMgr.SetLongVal(itsVal: VCoordinate; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the control’s current value in view coordinates, redrawing the
control if requested. It scales itsVal to a 16-bit value and then sets fLongVal
to that value. The itsVal parameter specifies the control's new value. If the
value of the redraw parameter is TRUE, then the control will be redrawn to
reflect its new value. If the value of the redraw parameter is FALSE, then the
control will not be redrawn even though the new value may affect its appearance.
You can set redraw to FALSE when you know the control will be redrawn eventually
and you wish to avoid drawing it twice, which makes the screen appear to
flicker. SetLongVal is called by the TScrollBar methods DeltaValue, DoMouseCommand,
and SetLongValues to set scroll bar values. It is also called by
TSScrollBar.DoMouseCommand. You can call SetLongVal to set the current value of any
control that has a 32-bit range; before calling SetLongVal you should first call
SetLongMax to allow it to adjust the value of the fBitsToShift field.
æKY TCtlMgr.SetLongValues
æD PROCEDURE TCtlMgr.SetLongValues(itsVal, itsMin, itsMax: VCoordinate;
redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetLongValues is a shorthand way of calling SetLongMax, SetLongMin, and
SetLongVal to set the control’s current values; this method also redraws the control
if requested. The method scales the values of the itsVal, itsMin, and itsMax
parameters to 16-bit values and then sets fLongVal, fLongMin, and fLongMax,
respectively, to those values. The itsVal parameter is the control's current value.
The itsMin parameter is the minimum value to which the control can be set,
expressed in view coordinates. The itsMax parameter is the maximum value to which the
control can be set, expressed in view coordinates. If the value of the redraw
parameter is TRUE, then the scroll bar is immediately redrawn to reflect its
new value. If the value of the redraw parameter is FALSE, then the scroll bar is
not redrawn, even though the new value may affect its appearance. You can set
redraw to FALSE when you know the control will be redrawn eventually and you
wish to avoid drawing it twice, which makes the screen appear to flicker.
SetLongValues is called by TCtlMgr.CreateCMgrControl. Instead of calling SetLongVal,
SetLongMax, and SetLongMin, you can call SetLongValues to set the current,
maximum, and minimum values of any control having a 32-bit range. Note that you need
not call SetLongMax before calling SetLongValues because it calls SetLongMax for you.
æKY TCtlMgr.SetMax
æD PROCEDURE TCtlMgr.SetMax(itsMax: INTEGER; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetMax sets a TCtlMgr control's maximum allowable value, redrawing the control
if requested. The itsMax parameter is the maximum value to which the control can
be set. If you set the redraw parameter to TRUE, the control is immediately
redrawn to reflect the new value. If you set the value of the redraw parameter to
FALSE, then the control is not redrawn, even though the new maximum may affect
its appearance. You can set redraw to FALSE when you know the control will be
redrawn eventually and you wish to avoid drawing it twice, which makes the
screen appear to flicker. SetMax is called by TScrollBar.SetLongMax to set the
scroll limits. You can call this method to set the maximum value of a TCtlMgr control.
æKY TCtlMgr.SetMin
æD PROCEDURE TCtlMgr.SetMin(itsMin: INTEGER; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetMin sets a TCtlMgr control's minimum allowable value, redrawing the control
if requested. The itsMin parameter is the minimum value to which the control can
be set. If you set the redraw parameter to TRUE, the control is immediately
redrawn to reflect the new value. If you set the value of the redraw parameter to
FALSE, then the control is not redrawn, even though the new minimum may affect
its appearance. You can set redraw to FALSE when you know the control will be
redrawn eventually and you wish to avoid drawing it twice, which makes the
screen appear to flicker. SetMin is called by TScrollBar.SetLongMin to set the
scroll limits. You can call this method to set the minimum value of a TCtlMgr control.
æKY TCtlMgr.SetText
æD PROCEDURE TCtlMgr.SetText(itsText: Str255; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetText installs the text used as the control’s label. The parameter itsText is
the string containing the control’s name. If you set the value of the redraw
parameter to TRUE, the control is immediately redrawn to reflect the new text. If
you set the value of the redraw parameter to FALSE, then the control is not
redrawn, even though the new text may affect its appearance. You can set redraw
to FALSE when you know the control will be redrawn eventually and you wish to
avoid drawing it twice, which makes the screen appear to flash. You can call this
method to set the label text on a control object that is an instance of
TCtlMgr or one of its subclasses.
æKY TCtlMgr.SetVal
æD PROCEDURE TCtlMgr.SetVal(newVal: INTEGER; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetVal sets a TCtlMgr control's current value, redrawing it if requested. The
newVal parameter is the control's new setting. If you set the redraw parameter to
TRUE, the control is immediately redrawn to reflect the new value. If you set
the value of the redraw parameter to FALSE, then the control is not redrawn,
even though the new value may affect its appearance. You can set redraw to FALSE
when you know the control will be redrawn eventually and you wish to avoid
drawing it twice, which makes the screen appear to flicker. SetVal is called by
methods that set a TCtlMgr control's value. These methods are
TScrollBar.SetLongVal, TCheckBox.SetState, TCheckBox.Toggle, TCheckBox.ToggleIf,
TRadio.SetState, TRadio.Toggle, and TRadio.ToggleIf. You can use SetVal in a similar
fashion.
æKY TCtlMgr.SetValues
æD PROCEDURE TCtlMgr.SetValues(itsVal, itsMin, itsMax: INTEGER; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC The SetValues method sets a TCtlMgr control's minimum, maximum, and current
value by calling, in turn, the TCtlMgr methods SetCtlMin, SetCtlMax, and
SetCtlValue; the SetValues method also redraws the control if requested. The parameter
itsVal is the control's current setting. The parameter itsMin is the minimum
value to which the control can be set. The parameter itsMax is the maximum value to
which the control can be set. If you set the redraw parameter to TRUE, the
control is immediately redrawn to reflect the new values. If you set the value of
the redraw parameter to FALSE, then the control is not redrawn, even though the
new values may affect its appearance. You can set redraw to FALSE when you
know the control will be redrawn eventually and you wish to avoid drawing it
twice, which makes the screen appear to flicker. You can call this method instead of
making separate calls to SetMax, SetMin, and SetVal.
æKY TCtlMgr.WhileFocused
æD PROCEDURE TCtlMgr.WhileFocused(PROCEDURE DoToControl; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC WhileFocused ensures that the control's view is focused before performing the
DoToControl procedure on it. If you set the value of the redraw parameter to
TRUE, the drawing done by DoToControl occurs on the screen. If the value of redraw
is FALSE, then MacApp temporarily makes the control invisible before calling
DoToControl; thus, any drawing done by DoToControl is not visible until the view
is updated. After DoToControl returns, the control's visibility is restored to
its former state. WhileFocused is often called as part of a method that sets a
control's value. Methods that call WhileFocused are TSScrollBar.Activate,
TCtlMgr.DimState,TCtlMgr.HiliteState, TCtlMgr.Resize, TCtlMgr.SetMax,
TCtlMgr.SetMin, TCtlMgr.SetText, TCtlMgr.SetVal, and TCtlMgr.SetValues. You can use
this method in a similar fashion.
æKY TCtlMgr.WriteRes
æD PROCEDURE TCtlMgr.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes is overridden to be an empty method so that TCtlMgr objects are not
written as part of a 'view' resource. The TCtlMgr class is never instantiated; it
exists to allow instances of its subclasses to inherit useful common behavior.
Instances of subclasses of TCtlMgr serve as “wrappers” for Macintosh Control
Manager controls, which can only be re-created on initialization and cannot be
saved. This version of WRes ignores its parameters; other versions of WRes
typically use them as follows: The parameter theResource is a handle to the view’s
resource template. The parameter itsParams is a pointer to the parameters MacApp
uses to create the new resource. MacApp does not call this method; you should
not, either.
æKY TDebugApplication.DoMenuCommand
æD FUNCTION TDebugApplication.DoMenuCommand(aCmdNumber: CmdNumber): TCommand;
æFm UDebug.inc1.p
æT METHOD
æC DoMenuCommand processes a user’s selection of the Quit command from a menu when
the application is compiled with debugging code included. The parameter
aCmdNumber is the command number defined for the selected menu item. The default
version of DoMenuCommand responds only to a value of cQuit (defined in the file
UDebug.p); if aCmdNumber is any other value, this method does nothing. MacApp calls
DoMenuCommand when the user chooses the Quit command while in debug mode. This
method is internal to the MacApp debugger; you cannot call it yourself or
override it.
æKY TDebugApplication.HandleAlienEvent
æD FUNCTION TDebugApplication.HandleAlienEvent
(VAR theEventInfo: EventInfo):TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleAlienEvent overrides TApplication.HandleAlienEvent to return NIL, to
prevent events from being passed to the co-handler chain. The parameter theEventInfo
is the event record representing the event to be handled. This method is
internal to the MacApp debugger; you cannot call it yourself or override it.
æKY TDebugApplication.HandleEvent
æD PROCEDURE TDebugApplication.HandleEvent(VAR theEvent: EventRecord); OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleEvent dispatches the specified event to its appropriate handler; because
PollEvent is not functioning while you are in the debugger, this method
overrides TApplication.HandleEvent to call PerformCommand instead of simply posting
the command to the command queue. The parameter theEvent is the event record that
represents the event that is to be handled. MacApp calls HandleEvent from the
TDebugApplication object’s main event loop. This method is internal to the
MacApp debugger; you cannot call it yourself or override it.
æKY TDebugApplication.HandleKeyDownEvent
æD FUNCTION TDebugApplication.HandleKeyDownEvent
(VAR theEventInfo: EventInfo): TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleKeyDownEvent processes the specified key-down event and calls the
appropriate DoKeyCommand or DoCommandKey method; this method overrides the
TApplication version of HandleKeyDownEvent to mask out keystrokes that have no
meaning to the debugger. The parameter theEventInfo is the event record representing
the event to be handled. MacApp calls HandleKeyDownEvent when a key-down event
occurs. This method is internal to the MacApp debugger; you cannot call it yourself
or override it.
æKY TDebugApplication.HandleMouseDown
æD FUNCTION TDebugApplication.HandleMouseDown
(VAR theEventInfo: EventInfo): TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleMouseDown processes the specified mouse-down event and returns an
appropriate TCommand object to handle undoable actions. The parameter theEventInfo is
the information from the Toolbox event record describing the mouse-down event
that caused this method to be called. MacApp calls HandleMouseDown when it
receives a mouse-down event from the system. This method is internal to the MacApp
debugger; you cannot call it yourself or override it.
æKY TDebugApplication.HandleSystemEvent
æD FUNCTION TDebugApplication.HandleSystemEvent
(VAR theEventInfo: EventInfo): TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleSystemEvent handles the events generated when the user passes control
between applications or desk accessories in the MultiFinder envirionment. The
parameter theEventInfo is the event record representing the event to be handled.
MacApp calls HandleSystemEvent when the TDebugApplication object becomes active or
inactive. This method is internal to the MacApp debugger; you cannot call it
yourself or override it.
æKY TDebugApplication.HandleUpdateEvent
æD FUNCTION TDebugApplication.HandleUpdateEvent
(VAR theEventInfo: EventInfo): TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC HandleUpdateEvent handles update events by redrawing the contents of the Debug
Transcript window when necessary. The parameter theEventInfo is the event record
representing the event to be handled. MacApp calls HandleUpdateEvent in
response to update events in the Debug Transcript window, for instance, when it is
uncovered and must be redrawn. This method is internal to the MacApp debugger;
you cannot call it yourself or override it.
æKY TDebugApplication.IDebugApplication
æD PROCEDURE TDebugApplication.IDebugApplication;
æFm UDebug.inc1.p
æT METHOD
æC IDebugApplication initializes the TDebugApplication object, making it the end of
the target chain (that is, initializing it so that no event handler follows
the object in the target chain). MacApp calls IDebugApplication from the
InitUDebug procedure. This method is internal to the MacApp debugger; you cannot call
it yourself or override it.
æKY TDebugApplication.MenuEvent
æD FUNCTION TDebugApplication.MenuEvent(menuItem: Longint): TCommand; OVERRIDE;
æFm UDebug.inc1.p
æT METHOD
æC MenuEvent handles a menu selection. It returns a TCommand object to handle
undoable commands. The menuItem parameter specifies the item chosen and the menu
from which it was chosen, in accordance with normal Macintosh Menu Manager
conventions. MacApp calls MenuEvent when the user chooses an item from a menu. This
method is internal to the MacApp debugger; you cannot call it yourself or
override it.
æKY TDebugApplication.PollEvent
æD PROCEDURE TDebugApplication.PollEvent;
æFm UDebug.inc1.p
æT METHOD
æC PollEvent calls TDebugApplication.Idle and then TDebugApplication.WaitNextEvent.
If it finds a pending event, then it calls TDebugApplication.HandleEvent to
dispatch it to the appropriate handler. This method is internal to the MacApp
debugger; you cannot call it yourself or override it.
æKY TDebugApplication.PostHandleEvent
æD PROCEDURE TDebugApplication.PostHandleEvent(VAR theEventInfo: EventInfo);
æFm UDebug.inc1.p
æT METHOD
æC PostHandleEvent performs certain housekeeping functions after calling
TDebugApplication.HandleEvent to handle an event. If the menu bar needs to be redrawn,
then PostHandleEvent redraws it. PostHandleEvent also calls
TDebugApplication.AboutToLoseControl if control is about to be passed to another
application or to a desk accessory. PostHandleEvent also calls
TDebugApplication.RegainControl when control is returned to the application. The
parameter theEventInfo is the event record for the event being handled. MacApp calls
PostHandleEvent from TDebugApplication.HandleEvent. This method is internal to the
MacApp debugger; you cannot call it yourself or override it.
æKY TDebugApplication.WMgrToWindow
æD FUNCTION TDebugApplication.WMgrToWindow(aWMgrWindow: WindowPtr): TWindow;
æFm UDebug.inc1.p
æT METHOD
æC WMgrToWindow returns the window object representing the specified Window Manager
window; it returns NIL if there is no window object. The aWMgrWindow parameter
is a pointer to the Window Manager window. This method is internal to the
MacApp debugger; you cannot call it yourself or override it.
æKY TDebugCommand.DoIt
æD PROCEDURE TDebugCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt enters the MacApp debugger. MacApp calls this method when the user chooses
the Enter MacApp Debugger menu item. You never need to call DoIt yourself.
æKY TDebugCommand.Fields
æD PROCEDURE TDebugCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TDebugCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TDebugCommand object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. our override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TDebugCommand.IDebugCommand
æD PROCEDURE TDebugCommand.IDebugCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IDebugCommand initializes a TDebugCommand object and associates it with a
command number. The itsCmdNumber parameter is the command number that is associated
with a particular menu command, in this case the Enter MacApp Debugger command.
The command number is used in the 'cmnu' resource in the resource description
file; you typically define a constant to represent that number in both the
resource description file and in the appropriate interface or implementation file of
the application. MacApp calls IDebugCommand when the user chooses the Enter
MacApp Debugger menu item. You usually do not need to call this method yourself.
æKY TDeskScrapView.CalcMinSize
æD PROCEDURE TDeskScrapView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC CalcMinSize calculates the minimum dimensions of the Clipboard view. This size
is equal to the value of the fSize field of the object unless the desk scrap
contains 'TEXT' or 'PICT' data, in which case the view is recalculated so that it
is large enough to display the text or picture frame. The minSize parameter
contains the calculated size, represented as a view point, when the method
returns. MacApp calls CalcMinSize when calculating the size of the Clipboard view for
display. You usually do not need to call CalcMinSize yourself.
æKY TDeskScrapView.CheckScrapContents
æD PROCEDURE TDeskScrapView.CheckScrapContents;
æFi UMacApp.p
æT METHOD
æC CheckScrapContents determines whether anything is stored in the desk scrap
associated with the TDeskScrapView object, and, if so, what type of data is stored
there. The default version of the method detects data of type 'TEXT' and of type
'PICT'. MacApp calls CheckScrapContents before drawing the view’s contents.
You usually do not need to call CheckScrapContents yourself.
æKY TDeskScrapView.Draw
æD PROCEDURE TDeskScrapView.Draw(area: Rect);
æFi UMacApp.p
æT METHOD
æC This method draws the contents of the desk scrap view on the screen; the default
version of this method supports 'TEXT' and 'PICT' data. The area parameter is
a QuickDraw rectangle described in the view’s local coordinates. The
TDeskScrapView version of Draw ignores this parameter. MacApp calls Draw when a window
is created with a TDeskScrapView object installed in it, and at other times when
the contents of the view need to be drawn. You usually do not need to call Draw
yourself.
æKY TDeskScrapView.Fields
æD PROCEDURE TDeskScrapView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TDeskScrapView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TDeskScrapView object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TDeskScrapView.Free
æD PROCEDURE TDeskScrapView.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC The TDeskScrapView version of Free is overridden to do nothing because the
default Clipboard view (gClipOrphanage) must always be available. MacApp does not
call this method; you should not call it, either.
æKY TDeskScrapView.GetInspectorName
æD PROCEDURE TDeskScrapView.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName specifies the name of the Clipboard view to be displayed in the
MacApp Inspector, based on the value of SELF; this method returns either the
string 'gClipOrphanage' or the string 'gClipView'. When the method returns, the
inspectorName parameter contains the name of the Clipboard view. MacApp calls
GetInspectorName from the Inspector. You usually do not need to call this method
yourself.
æKY TDeskScrapView.IDeskScrapView
æD PROCEDURE TDeskScrapView.IDeskScrapView;
æFi UMacApp.p
æT METHOD
æC IDeskScrapView initializes the fields of a newly created TDeskScrapView object.
MacApp calls this method when creating a new Clipboard view. You usually do not
need to call this method yourself.
æKY TDeskScrapView.IRes
æD PROCEDURE TDeskScrapView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC IRes initializes a TDeskScrapView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with this view; in the
case of the desk scrap, this parameter is NIL. The itsSuperView parameter is the
TView object into which the desk scrap view will be installed; this view is
usually a window. The itsParams parameter is a pointer to the portion of the
'view' resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data.
MacApp calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call. You
never need to call IRes yourself.
æKY TDeskScrapView.SuperViewChangedSize
æD PROCEDURE TDeskScrapView.SuperViewChangedSize(delta: VPoint;
invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC SuperViewChangedSize adjusts the size of the TDeskScrapView object and forces it
to redraw itself. The delta parameter is a point specifying the change in the
view’s height and width, in view coordinates. The value of the invalidate
parameter is TRUE if the view should be redrawn. MacApp calls SuperViewChangedSize
when the Clipboard window is resized. You usually do not need to call it
yourself.
æKY TDeskScrapView.WriteToDeskScrap
æD PROCEDURE TDeskScrapView.WriteToDeskScrap; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC The TDeskScrapView version of WriteToDeskScrap does nothing because
TDeskScrapView objects represent data that is already written to the desk scrap.
MacApp calls WriteToDeskScrap from TApplication.AboutToLoseControl when it needs to
preserve the contents of the Clipboard. You usually do not need to call this method
yourself.
æKY TDialogTEView.ComputeSize
æD PROCEDURE TDialogTEView.ComputeSize(VAR newSize: VPoint); OVERRIDE;
æFi UDialog.p
æT METHOD
æC ComputeSize computes a point that represents the horizontal and vertical
dimensions of the TDialogTEView object. The method stores the computed point in the
variable newSize. MacApp calls ComputeSize from methods that must use or adjust
the size of the TDialogTEView object. You usually do not need to call this
method yourself; you should change the size of a TDialogTEView object by overriding
the appropriate CalcMinSize or ComputeSize method.
æKY TDialogTEView.Fields
æD PROCEDURE TDialogTEView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TDialogTEView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TDialogTEView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TDialogTEView.Free
æD PROCEDURE TDialogTEView.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory occupied by the TDialogTEView object and its TextEdit
record. MacApp calls Free from a variety of methods that dispose of
TDialogTEView objects or of objects that contain TDialogTEView objects. You can call
Free to release the memory used by a TDialogTEView object when you no longer need
that object.
æKY TDialogTEView.IDialogTEView
æD PROCEDURE TDialogTEView.IDialogTEView(itsDocument: TDocument; itsSuperView: TView;
itsLocation, itsSize: VPoint; itsHDeterminer, itsVDeterminer: SizeDeterminer;
itsInset: Rect; itsTextStyle: TextStyle; itsJustification: INTEGER; itsStyleType,
itsAutoWrap: BOOLEAN);
æFi UDialog.p
æT METHOD
æC IDialogTEView initializes a newly created TDialogTEView object, assigning the
specified values to the appropriate fields. The itsDocument parameter is the
TDocument object with which the view will be associated. The itsSuperView parameter
is the TView object in which the TDialogTEView object is installed. Usually
the superview is a TWindow or TScroller object. The itsLocation parameter is the
view point that defines the location of the view’s top left corner in its
superview. The itsSize parameter is a view point that specifies the view’s
horizontal and vertical dimensions in pixels. The itsHDeterminer and itsVDeterminer
parameters determine how the view's horizontal and vertical dimensions are
calculated, respectively. Allowed values include sizeSuperView (the view is the same
size as its superview, sizeRelSuperView (the view size is relative to the
superview’s size), sizePage,(the view is the size of one page), sizeFillPages (the
view is to grow upward to fill an exact number of pages), sizeVariable (the view
size fluctuates according to application-specific criteria), or sizeFixed (the
size is fixed at the time the view is created). The itsInset parameter specifies
the width of the four margins around the view. The value is a Rect, and each
field of the Rect record (top, left, bottom, and right) specifies the size of
the corresponding margin. The itsTextStyle parameter is a TextStyle record that
specifies the style of the text displayed in the view. The itsJustification
parameter specifies how the view’s text is to be justified. Allowed values include
teJustLeft, teJustRight, and teJustCenter. The itsStyleType parameter specifies
whether the TDialogTEView object can display more than one text style at once:
kWithStyle specifies that the view can display multiple styles, and
kWithoutStyle specifies that it cannot. The itsAutoWrap parameter specifies whether
lines of text that are longer than the view is wide will wrap to the next line, or
will extend beyond the right edge of the view. A value of TRUE specifies that
long lines will automatically wrap to the next line. MacApp calls IDialogTEView
from methods that must create a TDialogTEView object, such as
TDialogView.MakeTEView. You can use this method in a similar fashion.
æKY TDialogTEView.InstallEditText
æD PROCEDURE TDialogTEView.InstallEditText(theEditText: TEditText;
selectChars: BOOLEAN);
æFi UDialog.p
æT METHOD
æC InstallEditText installs the specified TEditText object in the fEditText field
of the TDialogTEView object. The parameter theEditText is a TEditText object
which becomes the value of the fEditText field. The selectChars parameter
specifies whether to select the contents of the TEditText object; if the value of
selectChars is TRUE, then all the characters in the TEditText object are selected
when it is installed; otherwise, none of them are. MacApp calls InstallEditText
when a TDialogView object is selected and needs editing services. You usually do
not need to call this method yourself.
æKY TDialogTEView.InstallSelection
æD PROCEDURE TDialogTEView.InstallSelection(wasActive, beActive: BOOLEAN); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This override of InstallSelection forces the TDialogTEView object to be redrawn
if it is being deactivated and has been scrolled; otherwise, it simply calls
INHERITED InstallSelection to place the text insertion point and correctly
highlight the current selection. The effect of this method is that of “resetting” the
scroller to ensure that the view is drawn with the beginning of the text shown
when it is reactivated. Set the wasActive parameter to TRUE if the
TDialogTEView object was the active view before InstallSelection was called; otherwise,
set it to FALSE. Set the beActive parameter to TRUE if you want InstallSelection
to make the TDialogTEView object the active view; otherwise, set it to FALSE.
MacApp calls InstallSelection when the TDialogTEView object is deselected. You
usually do not need to call this method yourself.
æKY TDialogTEView.IRes
æD PROCEDURE TDialogTEView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TDialogTEView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TDialogTEView
object. The itsSuperView parameter specifies the TView object into which the
TDialogTEView object is to be installed; this view is usually a TWindow or TScroller
object. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data. MacApp
calls this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. You never
need to call IRes yourself.
æKY TDialogView.CanDismiss
æD FUNCTION TDialogView.CanDismiss(dismissing: IDType): BOOLEAN;
æFi UDialog.p
æT METHOD
æC CanDismiss returns the value TRUE if the TDialogView object is in a state which
will allow it to be dismissed. The result returned by CanDismiss is used by
TDialog.DismissDialog to determine whether to dismiss a dialog box or continue to
display it on the screen. An example of such use would be when the user entered
an out-of-range value in a TNumberText view; the resulting sequence of calls
would include a call to CanDismiss. Because CanDismiss attempts to validate the
current edit text before dismissing the view, the out-of-range value would
cause this method to return FALSE, and the TDialogView view would remain on the
screen. The dismissing parameter is the ID of the view making the call to
CanDismiss. MacApp calls CanDismiss from TDialogView.DismissDialog as described above.
You usually do not need to call the CanDismiss method yourself.
æKY TDialogView.CantDeselect
æD PROCEDURE TDialogView.CantDeselect(theEditText: TEditText; reason: LONGINT);
æFi UDialog.p
æT METHOD
æC CantDeselect displays an alert box warning the user that the specified text item
cannot be deselected, and restarts editing in the text item. The parameter
theEditText is the TEditText object that represents the text to be edited. The
reason parameter is a long integer code specifying the reason the text item can’t
be deselected; legal values for this parameter include kValidValue,
kInvalidValue, kValueTooSmall, kValueTooLarge, kNonNumericCharacters, and
kTooManyCharacters. MacApp calls CantDeselect from methods that change the currently
active TDialogView object when they are unable to deselect an already active dialog
view. You usually do not need to call this method yourself.
æKY TDialogView.Close
æD PROCEDURE TDialogView.Close; OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method closes the TDialogView object and the dialog box in which it is
installed. MacApp calls Close from a variety of methods that can dismiss a dialog
box. You usually do not need to call Close yourself.
æKY TDialogView.DeselectCurrentEditText
æD FUNCTION TDialogView.DeselectCurrentEditText: BOOLEAN;
æFi UDialog.p
æT METHOD
æC DeselectCurrentEditText returns the value TRUE if it succeeds in deselecting the
current edit text selection, which is a TEditText object. To do so, this
method must commit the last editing command, validate the state of the current edit
text, and then deselect it. MacApp calls DeselectCurrentEditText from methods
that change the editable text dialog item that is currently selected—for
example, this method is called from TDialogView.Tab. You usually do not need to call
DeselectCurrentEditText yourself.
æKY TDialogView.DismissDialog
æD PROCEDURE TDialogView.DismissDialog(dismisser: IDType);
æFi UDialog.p
æT METHOD
æC DismissDialog sets the value of the TDialogView’s fDismissed and fDismisser
fields if its call to CanDismiss succeeds. The dismisser parameter is the ID of the
control that issued the call to DismissDialog. MacApp calls DismissDialog from
TDialogView.DoChoice or from TDialogView.PoseModally when attempting to
dismiss a dialog box. You usually do not need to call DismissDialog yourself.
æKY TDialogView.DoChoice
æD PROCEDURE TDialogView.DoChoice(origView: TView; itsChoice: INTEGER); OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoChoice performs actions associated with a user’s choice in a dialog box. The
default method responds to the mEditTextHit message. An mEditTextHit message
causes this method to deselect the text item; if the user clicks any control that
has the fDismissesDialog field set, MacApp dismisses the dialog box and calls
the appropriate methods in response to the user’s choice. If the message is a
hit on a control that does not have the fDismissesDialog field set, the message
is passed along to the next handler in the chain by calling INHERITED DoChoice.
The origView parameter is the TView object that first made the call to its
DoChoice method in response to a user action. The itsChoice parameter is an integer
specifying the user’s choice. MacApp uses this parameter to determine the kind
of control that originated the DoChoice message; for instance, a value of
mOKButtonHit indicates that the DoChoice message originated in a TButton object.
MacApp calls DoChoice in response to a user’s selection in a dialog box. You
usually do not need to call DoChoice yourself.
æKY TDialogView.DoCommandKey
æD FUNCTION TDialogView.DoCommandKey(ch: CHAR;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoCommandKey handles keystrokes made with the Command key pressed, returning the
appropriate TCommand object. The default version handles Command-Period events
by flashing the dialog box’s Cancel item (if the item is a control) and then
calling the DoChoice method of the Cancel item. The ch parameter is the
character that corresponds to the key the user pressed in combination with the Command
key. The info parameter is the event record description of the key-down event
that caused MacApp to call DoKeyCommand; the info parameter is used to pass
information about the event, such as whether the Option key was pressed. The
default method ignores the info parameter, but overridden versions of DoCommandKey
can use the event record for their own purposes. MacApp calls DoCommandKey when a
key-down event is received while the Command key is pressed. You usually do
not need to call this method yourself. You can override this method to handle
such events in your own TDialogView objects.
æKY TDialogView.DoKeyCommand
æD FUNCTION TDialogView.DoKeyCommand(ch: CHAR; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoKeyCommand handles keystrokes made without the Command key pressed, returning
the appropriate TCommand object. The default version responds only to the
pressing of the Tab, Escape, Return, and Enter keys. It responds to Tab keystrokes
by changing the selected editable text field, to Escape keystrokes by selecting
the Cancel item, and to Return and Enter keystrokes by selecting the
TDialogView object’s default item. DoKeyCommand returns gNoChanges. The ch parameter
is the alphanumeric character that corresponds to the key the user pressed. The
aKeyCode parameter is the ASCII key code generated by the keystroke. The info
parameter is the event record description of the event that caused MacApp to call
DoKeyCommand; the info parameter is used to pass information about the event,
such as whether the Option key was pressed. MacApp calls DoKeyCommand when the
user presses a key on the keyboard. You usually do not need to override this
method or call it yourself.
æKY TDialogView.DoOpen
æD PROCEDURE TDialogView.DoOpen;
æFi UDialog.p
æT METHOD
æC DoOpen performs appropriate actions when a TDialogView object is created and
installed in another TWindow object. The default version selects the target object
of the TWindow object if the target is a TEditText object contained in the
dialog box. MacApp calls DoOpen when a TDialogView object is created. You usually
do not need to call DoOpen yourself. You can override this method to provide
specialized opening behavior for your own subclasses of TDialogView.
æKY TDialogView.DoSelectEditText
æD PROCEDURE TDialogView.DoSelectEditText(theEditText: TEditText;
selectChars: BOOLEAN);
æFi UDialog.p
æT METHOD
æC DoSelectEditText sets the selection in a TEditText view, attempting to make the
specified text the current edit text. The parameter theEditText is the text to
be selected. If the value of the selectChars parameter is TRUE, this method
attempts to deselect the current selection and select all of the characters in the
specified text. If value of the selectChars parameter is FALSE, the method
places the insertion point at the start of the field. MacApp calls DoSelectEditText
from methods that handle text selection in TDialogView objects, such as
TDialogView.Tab, TDialogView.DoOpen, and TDialogView.Tab. You usually do not need
to call DoSelectEditText yourself; rather, you should call SelectEditText to select
an editable text field in a TDialogView dialog box.
æKY TDialogView.EachEditText
æD PROCEDURE TDialogView.EachEditText(PROCEDURE DoToEditText(theEditText: TEditText));
æFi UDialog.p
æT METHOD
æC EachEditText performs the DoToEditText procedure on each editText field of the
TDialogView object. The DoToEditText parameter is a procedure of one argument
that is to be performed on each subview. You must declare and implement this
procedure yourself. The procedure you write can have any name that does not
conflict with other procedures in the scope of the TDialogView class. Just as you can
create any variable you like (as long as it is of the proper type) and then
pass that variable as an argument to a procedure, you can create any procedure you
like and pass it to EachEditText as long as the procedure accepts one argument
of type TEditText. This procedure is bound to the formal parameter
DoToEditText, and then is called with each of the TDialogView object’s TEditText items
bound to the parameter theEditText. EachEditText is a general utility method that
allows you to perform operations on all of a TDialogView object’s editable text
items, regardless of how many there are. MacApp calls this method when it must
iterate over a number of editable text items; you can use this method in a
similar fashion. You usually do not need to override EachEditText.
æKY TDialogView.Fields
æD PROCEDURE TDialogView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr;fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TDialogView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TDialogView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action
to ensure that the inherited fields are also displayed.
æKY TDialogView.Free
æD PROCEDURE TDialogView.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TDialogView object and removes the
TDialogTEView from its superview’s list of subviews. MacApp calls Free when closing a
view containing a TDialogView. You can call Free to release the memory used by a
TDialogView object when you no longer need that object.
æKY TDialogView.GetDialogView
æD FUNCTION TDialogView.GetDialogView: TView; OVERRIDE;
æFi UDialog.p
æT METHOD
æC GetDialogView returns SELF; you must cast the result as a TDialogView object
yourself. MacApp calls GetDialogView from several methods that perform operations
on TDialogView objects. You must call this method when you need a reference to
the TDialogView object; use the result returned by this method rather than
referring directly to SELF in TDialogView objects.
æKY TDialogView.IDialogView
æD PROCEDURE TDialogView.IDialogView(itsDocument: TDocument; itsSuperView: TView;
itsLocation, itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer; itsDefItemID,
itsCancelItemID: IDType);
æFi UDialog.p
æT METHOD
æC IDialogView initializes the fields of a newly created TDialogView object. The
itsDocument parameter is the document with which the view is associated; for
TDialogView objects, the value of this parameter is usually NIL. The itsSuperview
parameter is the TView object into which the TDialogView object is installed;
usually this parameter is a TScroller object or a TWindow object. The parameters
itsLocation and itsSize are view points that specify the view’s size and
location; itsLocation is described in the local coordinates of the superview. The
itsHSizeDet and itsVSizeDet parameters determine how the view's horizontal and
vertical dimensions are calculated, respectively. Legal values for them include
sizeSuperView (the view is the same size as its superview), sizeRelSuperView (the
view's size is relative to the superview’s size), sizePage (the view is the
size of one page), sizeFillPages (the view will grow upward to fill an exact
number of pages), sizeVariable (the view's size fluctuates according to
application-specific criteria), and sizeFixed (the size is fixed at the time the view
is created). The parameters itsDefItemID and itsCancelItemId are the IDs of two
TDialogView objects. The first is the default dialog item—that is, the one
selected if the user presses the Return or Enter key; the second is the Cancel
item—that is, the item that cancels the action that summoned the dialog box. You can
call IDialogView to initialize a TDialogView object.
æKY TDialogView.IRes
æD PROCEDURE TDialogView.IRes(itsDocument: TDocument; itsSuperView: TView; VAR
itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TDialogView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with this view; for a
TDialogView object, this parameter is usually NIL. The itsSuperView parameter
specifies the TView object into which the view is to be installed; for a TDialogView
object, this is usually a TDialogView or TWindow object. The itsParams parameter
is a pointer to the portion of the 'view' resource data used to initialize
this view. When the IRes method finishes initializing the view, the method moves
the pointer to the end of this data. MacApp calls this method for each of the
views created from a 'view' resource template, usually in response to a
NewTemplateWindow or a DoCreateViews call. You never need to call IRes yourself.
æKY TDialogView.MakeTEView
æD FUNCTION TDialogView.MakeTEView: TDialogTEView;
æFi UDialog.p
æT METHOD
æC MakeTEView creates and returns a default TDialogTEView object. MacApp calls
MakeTEView when it needs to create the TDialogTEView object used to perform text
editing in a TEditText view. You usually do not need to call this method
yourself.
æKY TDialogView.Open
æD PROCEDURE TDialogView.Open; OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method calls the TDialogView.DoOpen method to open the TDialogView object
and selects the editable text field if it is the window's target. MacApp calls
Open to open a dialog box. You usually do not need to call the Open method
yourself.
æKY TDialogView.ParamTxt
æD PROCEDURE TDialogView.ParamTxt(keyStr, valueStr: Str255);
æFi UDialog.p
æT METHOD
æC ParamTxt creates or changes entries in the fParamText field of the TDialogView
object. These entries provide parameterized text for use in dialog items. For
more detailed information about fParamText, see TDialogView.ReplaceText. The
keyStr parameter is the item in fParamText, and the valueStr parameter is the
string associated with that item. For example,
TDialogView.ParamTxt("DiskFull","Not enough disk space to complete the operation.");
creates an entry in the fParamText field under “DiskFull” with an associated value
that contains the string “Not enough disk space to complete the operation.”
MacApp does not call ParamTxt. You can use this method to maintain parameterized text
for dialog items so that text in those items can easily change for different
contexts.
æKY TDialogView.PoseModally
æD FUNCTION TDialogView.PoseModally: IDType;
æFi UDialog.p
æT METHOD
æC PoseModally presents the TDialogView object in a window that appears as a modal
dialog box; when the user dismisses the dialog box, this method returns the ID
of the dialog item the user selected to dismiss the dialog box. MacApp does not
call this method. You can use PoseModally to create standard Macintosh modal
dialog boxes.
æKY TDialogView.ReplaceText
æD PROCEDURE TDialogView.ReplaceText(VAR theText: Str255);
æFi UDialog.p
æT METHOD
æC ReplaceText replaces the dialog view’s parameter text entries with the strings
specified in the fParamTxt field. The fParamTxt field is a TAssociation object
that acts as a dictionary of text markers associated with strings. When
ReplaceText is called, the text markers in the TDialogView object’s text are replaced
with the markers’ associated strings. In this way MacApp emulates the function
of the Toolbox call ParamText. The parameter theText is the text whose markers
are to be replaced. MacApp calls ReplaceText from methods such as TCluster.Draw.
You can use this method to maintain parameterized text in dialog items. By
changing the text strings associated with particular entries in the fParamText
field, you can change the text of dialog items to suit different contexts. The
method TDialogView.ParamTxt creates or changes entries in the fParamText field.
æKY TDialogView.SelectEditText
æD PROCEDURE TDialogView.SelectEditText(itsIdentifier: IDType; selectChars: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SelectEditText places the insertion point in the text field to be edited,
setting its contents to be the current edit text if requested. The parameter
itsIdentifier is the ID of the text field to be edited. When the value of selectChars
is TRUE, this method attempts to select the contents of the specified field and
make it the current edit text. MacApp does not call SelectEditText. You can use
it to select an editable text field in a TDialogView dialog box.
æKY TDialogView.SurveyEditText
æD PROCEDURE TDialogView.SurveyEditText(VAR first, last, next, previous: TEditText);
æFi UDialog.p
æT METHOD
æC SurveyEditText determines certain characteristics of the text fields that can be
edited in a TDialogView object, and returns this information in the variable
parameters first, last, next, and previous. The parameter first contains the
first text item that can be edited in the TDialogView object’s list of items, and
the parameter last contains the last text item that can be edited. The
parameter next refers to the text item that will be selected next if the standard
tabbing sequence for a Macintosh dialog box is followed, and the parameter previous
refers to the item that was last selected. MacApp calls SurveyEditText to
retrieve the previously mentioned information for use in methods such as
TDialogView.Tab, which select or otherwise refer to the text items that can be edited
in a dialog box. You can use this method in a similar fashion.
æKY TDialogView.Tab
æD PROCEDURE TDialogView.Tab(tabBackward: BOOLEAN);
æFi UDialog.p
æT METHOD
æC Tab selects the next editable text field in a dialog box. Repeatedly calling Tab
causes each editable text field in a dialog box to be selected in turn. You
can set the parameter tabBackward to TRUE when you want this method to select
fields in the reverse of its usual order. MacApp calls Tab from
TDialogView.DoKeyCommand when the user presses the Tab key. You can use Tab to perform
the standard tabbing actions in a Macintosh dialog box, and you can override it in
your own dialog view classes to provide customized tabbing behavior.
æKY TDialogView.WRes
æD PROCEDURE TDialogView.WRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TDialogView portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TDialogView section of the view’s resource template. WRes is the inverse of the
IRes method, and is used only by programs that write 'view' resources; for
example, ViewEdit uses this method to create new 'view' resources from views that
are active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources.
Your override should check the size of the space remaining in the template past
the end of the previously-written resource data; if there is not enough space
to write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams,
and the size of your resource data, in bytes. ExpandPtr expands the 'view'
resource handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too
big, because MacApp reclaims unused space by returning a new value for itsParams
when the WRes method completes.
æKY TDialogView.WriteRes
æD PROCEDURE TDialogView.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('dlog') and
class name ('TDialogView') for the 'view' resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TDialogView object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TDocument.Abandon
æD PROCEDURE TDocument.Abandon;
æFi UMacApp.p
æT METHOD
æC Abandon, when overridden, can do any actions necessary when the user decides not
to save the changes to a document. The default version is an empty method.
MacApp calls this method when from TDocument.Close when the closes a document
without saving changes made to the document. You probably will not need to call
this method. You can override this method to perform any cleanup necessary when
the user abandons the document.
æKY TDocument.AboutToSave
æD PROCEDURE TDocument.AboutToSave(itsCmd: CmdNumber; VAR newName: Str255;
VAR newVolRefnum: INTEGER; VAR makingCopy: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC AboutToSave is an empty method; it is called just prior to saving the document
to disk, giving you an opportunity to run any additional code at that time. The
itsCmd parameter is a command number representing the command that caused
AboutToSave to be called. The newName parameter is a string representing the
filename under which the document's file is being saved. The newVolRefnum parameter is
the volume reference number under which the document's file is being saved.
The makingCopy parameter is set to TRUE when writing to a copy of the original
file. AboutToSave is called by TDocument.Save just before it actually saves the
document's data. You never need to call it yourself. You can override it to
implement further processing prior to saving the document; note that your override
method can use the VAR parameters to return a new document name or volume
reference number when the purpose of the save operation is to make a copy of the
document.
æKY TDocument.AddView
æD PROCEDURE TDocument.AddView(aView: TView);
æFi UMacApp.p
æT METHOD
æC AddView adds the specified view to the end of the document's view list. If the
view is a TWindow object, the view is also added to the window list. This method
ensures that the same view or window is not added to either of these lists
twice. The aView parameter is the view to be associated with the document. AddView
is called by TView.IView when the view is being initialized. You rarely call
AddView yourself; you can do so if you want to associate a view with the
document.
æKY TDocument.AddWindow
æD PROCEDURE TDocument.AddWindow(aWindow: TWindow);
æFi UMacApp.p
æT METHOD
æC AddWindow adds the specified window to the end of the document's window list. If
the window is not in the document's view list, the window is added to that
list also. The aWindow parameter is the window to be associated with the document.
AddWindow is called by TWindow.InstallDocument in order to associate a window
with the document. You rarely call AddWindow yourself; usually you call the
window's InstallDocument method.
æKY TDocument.CheckDiskFile
æD PROCEDURE TDocument.CheckDiskFile(rsrcId, rsrcIndex: INTEGER; reverting: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC CheckDiskFile determines whether the document's disk file has been changed by
another application. If it has, this method displays a phFileChanged alert with
parameter string ^0 set to fTitle and parameter string ^1 set to the string
specified by the rsrcId and rsrcIndex. If the user cancels the save operation,
CheckDiskFile aborts the save and signals failure with the error parameter equal to
noErr and the message parameter equal to msgCancelled. The rsrcID parameter
identifies a 'STR#' resource containing strings used in the alert displayed if
the file has changed since it was last opened by the application. The rsrcIndex
parameter is the index of the string in the 'STR#' resource. The reverting
parameter has the value TRUE if the file is being restored to match the last version
saved on the disk; in this case, I/O errors and file types that don’t match
the specified type cause failure. Otherwise, this method behaves as a save
operation, and any I/O errors and nonmatching file types are ignored. MacApp calls
CheckDiskFile whenever it attempts to save a document's file that is not kept
open—that is, when the data is read into memory and the file closed until the data
is written back to the file. Methods that call CheckDiskFile include
TDocument.Revert and TDocument.Save. You rarely need to override CheckDiskFile or call
it yourself; you might do this if you have changed the way MacApp handles the
saving of document files.
æKY TDocument.Close
æD PROCEDURE TDocument.Close;
æFi UMacApp.p
æT METHOD
æC This method closes a document and its windows, and frees the document. If the
document’s data has changed, Close displays a dialog box that asks the user to
save changes. If the user confirms, this method commits the last command if
necessary, calls the document’s Save method, closes all of the document’s windows,
and frees the document. If the user cancels, then the method signals failure
with the error parameter set to noErr and the message parameter set to
msgCancelled. Note: Close must never be called for a document related to a view in the
Clipboard; this is to avoid freeing the Clipboard view, whose existence is taken
for granted by most methods that use it. Close is called by TApplication.Close
and TWindow.CloseByUser when either the application or the user closes a
document. You usually do not need to call Close yourself, unless you have changed the
way MacApp handles documents. You can call this to close a document whether or
not it is represented by any windows. You do not need to override Close unless
you want to change what happens when a document is closed, or add to the
standard document-handling behavior of MacApp.
æKY TDocument.CloseView
æD PROCEDURE TDocument.CloseView(aView: TView);
æFi UMacApp.p
æT METHOD
æC CloseView closes a view or window associated with a document. The final decision
on closing the view rests with the document, which also decides whether to
close itself. This method does nothing if the specified view is not associated
with the document. The aView parameter specifies the view to be closed. MacApp
calls this method when a user closes a window. You probably will not need to call
this method yourself.
æKY TDocument.DeleteView
æD PROCEDURE TDocument.DeleteView(viewToDelete: TView);
æFi UMacApp.p
æT METHOD
æC DeleteView deletes the view from the document's view list. The viewToDelete
parameter is the TView object to be disassociated from the document. DeleteView is
called by TView.Free when it is freeing the view. You can call DeleteView if
you are changing the document with which a view is associated, or you no longer
want the view associated with the document. You rarely override DeleteView; you
might do so if you wish to change the way the document's list of views works.
æKY TDocument.DeleteWindow
æD PROCEDURE TDocument.DeleteWindow(windowToDelete: TWindow);
æFi UMacApp.p
æT METHOD
æC DeleteWindow deletes the window from the document's window list. The
windowToDelete parameter is the window to be disassociated from the document.
DeleteWindow
is called by TWindow.Free when freeing a window. You can call DeleteWindow if
you are changing the document with which a window is associated, or you no
longer want the window associated with the document. You rarely override
DeleteWindow; you might do so if you've changed the way the document's list of windows
works.
æKY TDocument.DiskFileChanged
æD FUNCTION TDocument.DiskFileChanged(checkType: BOOLEAN): OSerr;
æFi UMacApp.p
æT METHOD
æC DiskFileChanged tests the file type or modification date of the document's disk
file based on the value of the checkType parameter. DiskFileChanged returns
errFileChanged if the file's modification date does not match the value of
fModDate; it returns noErr if the modification date has not changed. This method
returns errFTypeChanged if the file type does not match the value of fFileType.; it
returns noErr if the file type has not changed. This method first calls the
global routine GetFileInfo; if GetFileInfo returns any result other than noErr,
this method returns that error code and does not test the file any further. If
the call to GetFileInfo succeeds, the file type or modification date is tested as
specified by the checkType parameter. The checkType parameter specifies
whether DiskFileChanged should check the file’s file type. If the value of the
checkType parameter is TRUE and the file’s type has changed, this method returns the
error code errFTypeChanged but does not check the file’s modification date. If
the value of checkType is TRUE and the file’s type has not changed, this method
checks the file’s modification date and returns errFileChanged if the file's
modification date has changed. If the value of the checkType parameter is FALSE,
this method tests the file’s modification date but does not check its file
type; it returns errFileChanged if the file’s modification date has changed.
DiskFileChanged is called by TDocument.CheckDiskFile to determine whether to allow
the user to cancel a save operation because another document has changed the
file. You rarely call DiskFileChanged yourself; however, you may need to call this
method yourself if you have overridden TDocument.CheckDiskFile, if you have
changed the way MacApp saves document files, or if you have changed the criteria
used to determine whether a file has changed.
æKY TDocument.DoInitialState
æD PROCEDURE TDocument.DoInitialState;
æFi UMacApp.p
æT METHOD
æC DoInitialState sets up the document's state when it is associated with a new,
unsaved file (as opposed to setting the document's state from data read from a
saved disk file). DoInitialState is an empty method; you can use it to do further
initialization that you would not do when opening a previously saved document.
MacApp calls DoInitialState when the user chooses the New command, when the
user chooses the Revert command and there is no saved file, and when the user
launches the application. You rarely call it yourself because MacApp calls it in
all cases necessary. You override this method often to provide additional
initialization when new documents are created.
æKY TDocument.DoMakeViews
æD PROCEDURE TDocument.DoMakeViews(forPrinting: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DoMakeViews creates all necessary views for the document—both the views that
interpret the document's data and those that are independent of the data (such as
windows, palettes, and scrollers)—and stores them in the document's fields. The
forPrinting parameter has the value TRUE if DoMakeViews is called in response
to a message to print a document from the Finder. In this case, DoMakeViews
creates only those views required for printing the document's data. If your
application creates views that are not printed (such as palette views or windows),
you do not need to create them when the value of forPrinting is TRUE. MacApp
calls DoMakeViews after creating and initializing a document and before the
document's windows are created. It is called by TApplication.OpenNew when creating a
new, unsaved document; it is called by TApplication.OpenOld when opening a
previously saved document, and it is called by TApplication.PrintDocument when
printing a document from the Finder. You never call DoMakeViews yourself; however
you frequently override it because your implementation of this method is specific
to the kind of data your document stores. If you don't override DoMakeViews
but do include the default 'view' template in your resource description file,
MacApp creates a default view and window when it calls DoMakeViews. See the MacApp
2.0 Cookbook for details on how to implement this method.
æKY TDocument.DoMakeWindows
æD PROCEDURE TDocument.DoMakeWindows;
æFi UMacApp.p
æT METHOD
æC DoMakeWindows is an empty method included primarily for compatibility with
MacApp 1.1. Applications created in MacApp versions 1.x frequently overrode this
method to make the document's windows separately from the views that rendered its
data; in MacApp versions 2.x, all views, including windows, are subclasses of
TView and are created in the DoMakeViews method. For compatibility purposes,
DoMakeWindows is called by TApplication.OpenOld or TApplication.OpenNew after a
document is opened, is initialized, and has its views created. You never need to
call DoMakeWindows yourself, regardless of what version of MacApp you may be
using. In versions 2.x of MacApp, you usually override DoMakeViews to make all of
the views, including the windows, for your document.
æKY TDocument.DoMenuCommand
æD FUNCTION TDocument.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMenuCommand performs the appropriate actions to process a user’s menu
selection. The default method retuns a TCommand object to handle the commands cSave,
cSaveAs, cSaveCopy, and cRevert. Commands within the range cPrFileBase to
cPrFileMax are passed to the DoMenuCommand method of the document’s print handler.
All other commands are returned to the command chain by calling INHERITED
DoMenuCommand. The parameter aCmdNumber is the command number defined for the selected
menu item. MacApp predefines certain command numbers as constants in the file
UMacApp.p; you can define others in your 'cmnu' resource description and in the
appropriate interface or implementation file. MacApp calls DoMenuCommand when
the user chooses a Print, Save, Save As, Save a Copy, or Revert command from a
menu.Although you usually do not need to call this method yourself, you often
override DoMenuCommand when your application has its own menu commands that apply
to the document as a whole. In that case, you must end your override method by
calling INHERITED DoMenuCommand so that MacApp can return to the command chain
those commands that the override does not handle.
æKY TDocument.DoNeedDiskSpace
æD PROCEDURE TDocument.DoNeedDiskSpace(VAR dataForkBytes, rsrcForkBytes: LONGINT);
æFi UMacApp.p
æT METHOD
æC DoNeedDiskSpace uses the parameters you specify to return the amount of disk
space needed to save the document's data. The dataForkBytes parameter indicates
the amount of disk space in the data fork needed to save the document’s data. If
your document saves print information, DoNeedDiskSpace adds the value of
kPrintInfoSize to the value you specify in dataForkBytes and returns the new value
in dataForkBytes. The rsrcForkBytes parameter indicates the amount of disk space
in the resource fork needed to save the document’s data. DoNeedDiskSpace adds
the value of kRsrcFileOverhead to the value you specify in rsrcForkBytes and
returns the new value in rsrcForkBytes. DoNeedDiskSpace is called by
TDocument.Save when saving a document's data; you usually do not need to call it
yourself.
You almost always override this method, however; documents that do not override
DoNeedDiskSpace should not save any data except the print information record.
Your override method should accurately predict how much disk space will be
needed to store the data and resources for the documents. Because MacApp may have
already set values for dataForkBytes and resourceForkBytes before calling
DoNeedDiskSpace, you should add your needs to the initial values of these variables.
You need only supply values in bytes because MacApp automatically accounts for
an integral number of blocks necessary to complete the save operation. Most
documents have no resources, so the value of the rsrcForkBytes parameter is
usually 0. If your document does use the resource fork, you can use the constants
kRsrcTypeOverhead and kRsrcOverhead to account for the resource file overhead for
each resource type and individual resource, respectively.
æKY TDocument.DoRead
æD PROCEDURE TDocument.DoRead(aRefNum: INTEGER; rsrcExists, forPrinting: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DoRead reads an existing document file to use its data in the document object
and stores its printing information in the fPrintInfo field if the document saves
print information. The aRefNum parameter is the File Manager reference number
that specifies the file to be read. If the document doesn’t use the document's
data fork—that is, if it uses only the file’s resource fork—the value of
aRefNum is 0. The rsrcExists parameter has the value TRUE if the resource fork of the
file exists; the default version of DoRead ignores this parameter, however.
The forPrinting parameter has the value TRUE if the file is being read only so
that it can be printed; the default version of DoRead ignores this parameter
also. DoRead is called by TDocument.ReadFromFile. You normally only call DoRead as
an inherited method from within your override DoRead method; otherwise, you
never call it. You almost always override DoRead because documents that do not
override this method cannot save or restore anything except their print
information record. Your override method provides specific behavior your application
needs when it reads a document’s data from the disk; this override method must call
INHERITED DoRead unless you intend to eliminate or change the standard
document reading behavior of the TDocument class. Your implementation of DoRead
OVERRIDE generally begins with a call to INHERITED DoRead so that the print
information record is read, if necessary. It then reads the data of the document and
stores it in fields or objects available to the document object. You should check
the rsrcExists parameter before trying to read the resource fork. (It is
possible that the user opened a document having no resource fork. MacApp does not
consider this an error.) If your document uses the resource fork and the resource
fork exists, then MacApp will ensure that the current resource file is that of
the document when this method is called. You may want call the Toolbox function
CurResFile to get the reference number of the resource file at the start of
this method if you think that some other method might change the current resource
file. For more details about implementing your DoRead OVERRIDE method, see the
section on opening an existing document file recipe in the MacApp 2.0
Cookbook.
æKY TDocument.DoSetupMenus
æD PROCEDURE TDocument.DoSetupMenus; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoSetupMenus enables menu items to which the TDocument object’s DoMenuCommand
method can respond. DoSetupMenus is initially called by
TApplication.SetupTheMenus; afterwards, it is called by TEvtHandler.DoSetupMenus when
setting the attributes of the menus and this document is in the target chain.
You never need to call DoSetupMenus yourself; however, you will often override it.
You override DoSetupMenus if you define any menu commands that apply to your document.
In general, you override this method whenever you override TDocument.DoMenuCommand.
Your implementation must begin by calling INHERITED DoSetupMenus so that MacApp
can do initial setup of the menus first. You can then use either of the global
routines Enable or EnableCheck to enable any menu commands that can currently be
used. You can also adorn menus in other ways; for more detailed information,
see the chapter on menus and menu commands in the MacApp 2.0 Cookbook.
æKY TDocument.DoWrite
æD PROCEDURE TDocument.DoWrite(aRefNum: INTEGER; makingCopy: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DoWrite saves a document’s data to a disk file; however, the default version of
this method writes only the document's print information. You must override
this method, providing the code that saves your document's data. The aRefNum
parameter is the file-system reference number for the document file. MacApp obtains
the value of aRefNum from the file system. The makingCopy parameter is set to
TRUE when DoWrite is to save a copy of the document, as opposed to a normal Save
or Save As operation. This parameter is usually used for optimizing disk-based
documents. DoWrite is called by TDocument.MakeNewCopy to write the contents of
the document to a disk file. You usually call DoWrite only as an inherited
method from within your override DoWrite method; otherwise, you never call it
yourself. You almost always override DoWrite because documents that do not override
this method cannot save or restore anything except their print information
record. Your implementation of the override method begins with a call to INHERITED
DoWrite if it is necessary to save the print information record. It then saves
the document’s data. If your document uses the resource fork and the resource
fork exists, MacApp will ensure that the topmost resource file is that of the
document when this method is called. You may also want to get the reference
number of the resource file at the start of this method if you think that some
other method might change the topmost resource file. For more details about
implementing your DoWrite OVERRIDE method, see the section on saving and restoring
data recipe in the MacApp 2.0 Cookbook.
æKY TDocument.Fields
æD PROCEDURE TDocument.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TDocument object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TDocument
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TDocument.ForAllViewsDo
æD PROCEDURE TDocument.ForAllViewsDo(PROCEDURE DoToView(aView: TView));
æFi UMacApp.p
æT METHOD
æC ForAllViewsDo performs the specified operation on every view belonging to the
document. The DoToView parameter is a procedure, usually local to the caller,
that is called repeatedly by ForAllViewsDo and passed to each of the views in
turn. MacApp calls ForAllViewsDo when it needs to apply some action to all of a
document's views. ForAllViewsDo is called by TDocument.ShowReverted to notify each
view that the document's data has been restored to match the last saved
version. This method is also called by TStdPrintHandler.CheckPrinter to notify each
view that the print characteristics may have changed. You can call this method
if you want to apply some action to each of the document's views—for example,
you may want to invalidate each view because the document's data changed. You
override ForAllViewsDo only if you've changed the way the document's list of views
works.
æKY TDocument.ForAllWindowsDo
æD PROCEDURE TDocument.ForAllWindowsDo(PROCEDURE DoToWind(aWindow: TWindow));
æFi UMacApp.p
æT METHOD
æC ForAllWindowsDo performs the specified procedure on each window belonging to the
document. The DoToWind parameter is a procedure, usually local to the caller,
that is applied to each window in the document's list of windows (fWindowList).
MacApp calls ForAllWindowsDo to apply some action to each of the document's
windows. This method is called by TDocument.Close to close each of the document's
windows when closing the document. It is also called by TDocument.SetTitle to
set each of the window's titles to reflect the document's title.
TDocument.ShowWindows uses it to cause all of the document's windows to be shown, if
the window's fOpenInitially field is set to TRUE. TWindow.CloseByUser calls this
method to count a document's open windows. You can call ForAllWindowsDo if you want
to apply some action to all of a document's windows. You override this method
only if you've changed the way the document's list of windows works.
æKY TDocument.Free
æD PROCEDURE TDocument.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free releases the memory used by the TDocument object. MacApp usually frees
document objects when they are closed; thus, you usually do not call this method
yourself unless you change the way MacApp handles document objects. However, you
often override Free for classes containing objects or data structures that are
dependent on those you’ve defined in your subclass of TDocument, because you
may not wish to free them at the same time you close the document. For example,
your override of Free should also free any data stored in the object’s fields.
You can, of course, override Free to call FreeData if it is convenient. When you
override this method, you need to determine what objects are dependent on SELF.
æKY TDocument.FreeData
æD PROCEDURE TDocument.FreeData;
æFi UMacApp.p
æT METHOD
æC FreeData is an empty method; your override of this method should free the data
structures or objects that you have defined to represent the document's data.
FreeData is called by TDocument.Revert. You can call this method from your
implementation of Free, if convenient. You frequently override this method if the
data structures or objects you have defined to represent the document's data need
to be freed when the document is reverted (in anticipation of being recreated
by DoRead or DoInitialState).
æKY TDocument.FreeFile
æD PROCEDURE TDocument.FreeFile;
æFi UMacApp.p
æT METHOD
æC FreeFile frees resources associated with an open document. The default version
closes the data and/or resource forks of the document's file if they are open.
FreeFile is called by TDocument.Free when freeing the document. It is also
called by TDocument.SaveInPlace when saving the document “in place.”
TDocument.SaveViaTemp calls FreeFile when using a temporary file in the save
operation. Although you rarely call FreeFile yourself, you sometimes override it if
you need to take specific action when disassociating a document object from a file.
æKY TDocument.FreeFromClipboard
æD PROCEDURE TDocument.FreeFromClipboard;
æFi UMacApp.p
æT METHOD
æC FreeFromClipboard deletes the Clipboard window (gClipWindow) from the window
list (fWindowList) and then calls TDocument.Free to free the Clipboard document.
FreeFromClipboard is called by TView.FreeFromClipboard. You never call it
yourself, although you may sometimes override it if you need to free a document on
the Clipboard other than by calling TDocument.Free.
æKY TDocument.GetChangeCount
æD FUNCTION TDocument.GetChangeCount: LONGINT;
æFi UMacApp.p
æT METHOD
æC GetChangeCount returns the current change count for the document; it is used to
determine if the document needs to be saved. If GetChangeCount returns a
non-zero result, the document has changed since it was last saved to the disk. MacApp
calls this method to get the change count for the document. You can use the
method in a similar fashion.
æKY TDocument.GetInspectorName
æD PROCEDURE TDocument.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName retrieves the contents of the TDocument object’s fTitle field
for display in the Inspector window. When the method returns, the inspectorName
parameter contains the name of the TDocument object. GetInspectorName is called
by TObjListView.GetItemText to retrieve the text displayed in the upper-right
pane of an Inspector window. You rarely need to call GetInspectorName yourself,
except possibly for debugging purposes. You can override this method to change
the way the Inspector works—for example, you can override this method to
display something other than the document’s title in the upper-right pane of the
Inspector windows.
æKY TDocument.GetSaveInfo
æD FUNCTION TDocument.GetSaveInfo(itsCmdNumber: CmdNumber; copyFInfo: BOOLEAN;
VAR cInfo: CInfoPBRec): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC GetSaveInfo returns information required for saving the document to a file. If
the values of fSaveExists and copyFInfo are both TRUE, this method fills in the
cInfo parameter with information from the file to be saved. If either of those
values are FALSE, GetSaveInfo sets only the file type and creator using the
TDocument fields. GetSaveInfo returns the value TRUE if it successfully gets the
information from the file; if an error occurs when it calls the file system, the
cInfo record is invalid. The itsCmdNumber parameter is the command that caused
the document to be saved. The copyFInfo parameter is set to TRUE by
TDocument.Save if the values of askForFilename and makingCopy are both FALSE; this
indicates that the document's existing file information should be copied. The cInfo
parameter is the file information that GetSaveInfo returns. MacApp calls
GetSaveInfo when saving the document's data to a file. You rarely call GetSaveInfo
yourself, unless you have implemented your own file-saving techniques. This method
is called by TDocument.SaveInPlace when saving a file in place of the
original, and it is called by TDocument.SaveViaTemp when saving to a temporary file.
You usually do not need to override GetSaveInfo.
æKY TDocument.GetTempName
æD PROCEDURE TDocument.GetTempName(VAR fileName: Str255);
æFi UMacApp.p
æT METHOD
æC GetTempName returns a temporary name used in saving the file. The filename has
two parts: the first part is the document's name, or the application's name if
the document is untitled. The second part, appended to the first, is a
pseudo-random number based on the tick count and number of seconds since startup. The
fileName parameter is a name for a temporary document file. MacApp calls
GetTempName from TDocument.SaveViaTemp when saving the document to a temporary file.
You can call it if you need to generate a name for a temporary file. You can
override this method if you need to change the way the temporary filename is
determined, but you rarely need to do so.
æKY TDocument.HandlesPrintingCommands
æD FUNCTION TDocument.HandlesPrintingCommands: BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC HandlesPrintingCommands returns the value TRUE if the TDocument object handles
printing commands. MacApp calls HandlesPrintingCommands from
TDocument.DoSetupMenus to decide whether the document's print handler should set up
the print-related commands; if the document has a print handler and the target view
does not handle printing commands, the document's print handler is given the
responsibility. Printing commands are usually handled by one of the document's views;
however, in some situations it may be more appropriate for the document to handle
these commmands. Because the default version of HandlesPrintingCommands simply
returns the value FALSE, you must override this method if you want your
documents to handle printing commands. Your override method must return the value
TRUE, enable the print commands in your override of TDocument.DoSetupMenus, and
handle the print commands in your override of TDocument.DoMenuCommand. You never
need to call this method yourself.
æKY TDocument.IDocument
æD PROCEDURE TDocument.IDocument(itsFileType, itsCreator: OSType;
usesDataFork, usesRsrcFork: BOOLEAN; keepsDataOpen, keepsRsrcOpen: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC IDocument initializes the TDocument object. The itsFileType parameter is an
array of four characters that specifies the document’s file type. The itsCreator
parameter is an array of four characters that specifies the document file’s
creator (that is, the signature of the application that created it). The value of
the usesDataFork parameter is TRUE if the document uses its data fork. The value
of the keepsDataOpen parameter is TRUE if the application keeps the document's
data fork open when the file is open. The value of the usesRsrcFork parameter
is TRUE if the document uses its resource fork. The value of the keepsRsrcOpen
parameter is TRUE if the application keeps the document's resource fork open
when the file is open. MacApp calls this method from several places, including
TApplication.DoMakeDocument and TInspector.IInspector. You must call IDocument
from your TDocument subclass initialization method. You never need to override
IDocument.
æKY TDocument.MakeNewCopy
æD PROCEDURE TDocument.MakeNewCopy(makingCopy: BOOLEAN; validFInfo: BOOLEAN;
VAR cInfo: CInfoPBRec);
æFi UMacApp.p
æT METHOD
æC MakeNewCopy creates a copy of the document's data in the specified file. The
makingCopy parameter has the value TRUE if the purpose of calling MakeNewCopy is
to produce a copy of the document—that is, to do a Save A Copy In operation. If
the value of makingCopy is FALSE, this method exits through the failure
mechanism. The validFInfo parameter has the value TRUE if the information in cInfo is
completely valid, in which case the file system routine PBSetFInfo is called to
set the file's save information to that stored in cInfo. The cInfo parameter
is the file's save information; it is used to make the copy. The cInfo parameter
specifies the file's name, volume refnum, file type, and creator. The other
fields of cInfo are used only if the value of the makingCopy parameter is FALSE.
The makingCopy parameter is set to TRUE if the intention is to make a copy of
the document, rather than carrying out a normal Save or Save As operation. The
caller is responsible for calling the Toolbox routine FlushVol after calling
MakeNewCopy. MacApp calls MakeNewCopy from TDocument.SaveInPlace when saving a
file in place of the original. TDocument.SaveViaTemp also calls MakeNewCopy when
saving to a temporary file. You usually do not need to call MakeNewCopy yourself
or override it unless you've implemented your own file-saving methods.
æKY TDocument.OpenAFile
æD FUNCTION TDocument.OpenAFile(name: Str255; volRefnum: INTEGER;
openData, openRsrc: BOOLEAN; dataPerm, rsrcPerm: INTEGER;
VAR dataRefnum, rsrcRefnum: INTEGER): OSerr;
æFi UMacApp.p
æT METHOD
æC OpenAFile opens the document's data and resource forks as specified, and returns
their reference numbers. The name parameter is the file’s name. The volRefnum
parameter is the file's volume reference number or working directory number. If
you set the openData or openRsrc parameters to TRUE, this method opens the
file's data fork or resource fork, respectively. The dataPerm parameter specifies
the data fork's access permissions. Similarly, the rsrcPerm parameter specifies
the resource fork's access permissions. If the openData parameter is set to
TRUE, the dataRefnum parameter, is the data fork's reference number returned by
OpenAFile (otherwise, the parameter is kNoFileRefNum). If the openRsrc parameter
is set to TRUE, the rsrcRefnum parameter is the resource fork's reference
number, also returned by OpenAFile (otherwise, the parameter is kNoFileRefNum).
MacApp calls OpenAFile whenever a document's file is opened. This method is called
by TDocument.MakeNewCopy when creating a copy of the document's data in a new
file. It is also called by TDocument.ReadFromFile when reading the contents of
a document's file. Another method that calls OpenAFile is TDocument.SavedOn,
which uses it to reopen a document's file after the document's data has been
saved. It is also called by TDocument.SaveViaTemp to reopen a document's file a
save operation to a temporary file fails. You can call OpenAFile yourself if you
want to handle opening the document's file differently; otherwise, you usually
do not need to call this method yourself or override it.
æKY TDocument.OpenAgain
æD PROCEDURE TDocument.OpenAgain(itsCmdNumber: CmdNumber; openingDoc: TDocument);
æFi UMacApp.p
æT METHOD
æC OpenAgain takes action if the user tries to open the same document twice. If the
document's fReopenAlert field has the value TRUE, OpenAgain displays the alert
phReopenDoc (informing the user that the document can't be opened), brings the
first window in the already-opened document's window list to the front, and
signals a silent failure (no error and no message). The itsCmdNumber parameter is
the command that caused the attempt to open the document. The openingDoc
parameter is the document MacApp is attempting to open; usually the value of this
parameter is NIL. MacApp calls OpenAgain from TApplication.OpenOld when
attempting to open an existing document; you usually do not need to call this method
yourself. You might override this method, for example, if you want to open a
second window that displays exactly the same portion of the document. You could also
override this method to create a read-only copy of the document.
æKY TDocument.PoseSaveDialog
æD FUNCTION TDocument.PoseSaveDialog: INTEGER;
æFi UMacApp.p
æT METHOD
æC If the document has been changed (that is, the fChangeCount is not equal to 0),
then PoseSaveDialog displays the "Do you want to save this document?" dialog
box, returning the user's response. PoseSaveDialog returns cancel, kYesButton, or
kNoButton, depending on which button the user clicks. If the document has not
been changed then this method returns kNoButton. MacApp calls this method from
TDocument.Close when closing the document; you usually do not need to call it
yourself. Unless you want to change the nature of the dialog box, you usually do
not override this method.
æKY TDocument.ReadFromFile
æD PROCEDURE TDocument.ReadFromFile(VAR anAppFile: AppFile; forPrinting: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC ReadFromFile opens the document's file, reads the data by calling
TDocument.DoRead, and closes the file if necessary. The method also sets the
document's fDataRefNum, fRsrcRefNum and fModDate fields, and, if the document keeps
the resource fork open, the method sets the newly opened resource fork to be the
current (topmost) file in the resource file chain. The anAppFile parameter describes
the file to be opened. If the value of anAppFile.fName is the empty string, then
ReadFromFile reads from the file specified in the instance variables instead of
that specified by the anAppFile parameter, and the contents of anAppFile are
updated to match the document. The forPrinting parameter is set to TRUE when the
file is opened solely for printing from the Finder. MacApp calls ReadFromFile
when opening a document. It is called by TApplication.OpenOld when opening an
existing document. It is also called by TApplication.PrintDocument when opening a
document for printing from the Finder. ReadFromFile is also called by
TDocument.Revert when opening an existing document's saved file during a revert
operation. You rarely need to call ReadFromFile yourself. You usually do not override
this method unless you want to change the way a document's data is read in from
its file when the document is opened.
æKY TDocument.RequestFileName
æD PROCEDURE TDocument.RequestFileName(itsCmdNumber: CmdNumber;
makingCopy: BOOLEAN; VAR fileName: Str255; VAR volRefnum: INTEGER);
æFi UMacApp.p
æT METHOD
æC RequestFileName displays the standard "put file" dialog box asking the user to
specify a filename for the document. If the user clicks the OK button, then this
method sets the document's filename and volRefNum. If the file has already
been opened by another document object, the other document's OpenAgain method is
called (which by default signals failure). If a file having the same name exists
on the same volume, that file is deleted. If the user clicks on the Cancel
button, a silent failure is signalled. The itsCmdNumber parameter specifies the
command that caused the document to be saved. The makingCopy parameter is set to
TRUE if the save operation is to create a copy of the document, as opposed to a
normal Save or Save As operation. The fileName parameter is the filename
specified by the user. The volRefnum parameter is the reference number of the volume
specified by the user. MacApp calls RequestFileName from TDocument.Save when
saving a document. You usually do not need to call this method yourself or
override it unless you've implemented your own document-saving methods. If you do
want to modify the "put file" dialog box, it is usually sufficient to override
TDocument.SFPutParms.
æKY TDocument.Revert
æD PROCEDURE TDocument.Revert;
æFi UMacApp.p
æT METHOD
æC Revert restores the document to match the last version that was saved on the
disk, or restores the document to its initial state if the document has never been
saved. MacApp calls this method when the user issues the Revert command. You
usually do not call the Revert method yourself unless you want to restore a
document in some other way than by using the Revert menu command or its keyboard
equivalent.
æKY TDocument.Save
æD PROCEDURE TDocument.Save(itsCmdNumber: CmdNumber;
askForFilename, makingCopy: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Save implements a variety of strategies that save the document on the disk . The
itsCmdNumber parameter is the command that caused the save operation to take
place. If the askForFilename parameter has the value TRUE, Save asks the user to
specify a filename for the document to be saved. The makingCopy parameter has
the value TRUE when the purpose of the save operation is to make a copy of the
document. If makingCopy is set to TRUE, then Save does not rename the document.
MacApp calls Save to save a document to disk. Save is called by
TDocument.Close when closing a document that was changed while it was open. Save is
also called by TDocument.DoMenuCommand when the user chooses the Save, Save As, or
Save A Copy In command. Note that Save calls the Toolbox routine FlushVol, which
takes care of the requirements of TDocument.MakeNewCopy, TDocument.SaveInPlace,
and TDocument.SaveViaTemp; it also calls the document's SavedOn method. Unless
you implement document-saving commands other than the standard ones, you usually
do not need to call the Save method yourself. For the same reason, you rarely
need to override Save.
æKY TDocument.SaveAgain
æD PROCEDURE TDocument.SaveAgain(itsCmdNumber: CmdNumber; makingCopy: BOOLEAN;
savingDoc: TDocument);
æFi UMacApp.p
æT METHOD
æC SaveAgain displays an error after the user chooses Save As or Save a Copy In and
specifies the name of a document that is already opened. The itsCmdNumber
parameter is the command that caused the attempted save operation to take place.
The makingCopy parameter has the value TRUE when the purpose of the save
operation is to make a copy of the document. If makingCopy is set to TRUE, then
SaveAgain does not rename the document. The savingDoc parameter is the document being
saved. You usually do not call SaveAgain yourself; MacApp calls this method
from TDocument.RequestFileName when the user specifies the name of the file in
which to save a document. You might override SaveAgain to allow the user of your
application to save a document to a file that is already opened by another
document; otherwise, you usually do not override this method.
æKY TDocument.SavedOn
æD PROCEDURE TDocument.SavedOn(VAR fileName: Str255; volRefnum: INTEGER);
æFi UMacApp.p
æT METHOD
æC After the document has successfully been saved, SavedOn updates the document's
filename, volume reference number, and modification data and then reopens the
file. The fileName parameter is the name of the file in which the document was
saved. The filename parameter is not changed by this method; it is a VAR
parameter for performance reasons. The volRefnum parameter is the volume reference
number of the disk where the file was written. After the save operation is
successfully completed, MacApp calls SavedOn from TDocument.Save to set the document
to the new filename and volume reference number. Unless you've implemented your
own document-saving methods, you usually do not need to call SavedOn yourself.
You can override SavedOn if you wish to change the information it returns
regarding a successfully saved document or if you want to change the way MacApp
handles save operations that do not make copies.
æKY TDocument.SaveInPlace
æD PROCEDURE TDocument.SaveInPlace(itsCmdNumber: CmdNumber;
makingCopy, copyFInfo: BOOLEAN; VAR fileName: Str255; volRefnum: INTEGER);
æFi UMacApp.p
æT METHOD
æC SaveInPlace saves the document to a disk file, deleting the previously saved
file before saving the document. If the value of either fDataOpen or fRsrcOpen is
TRUE, this method does nothing. The itsCmdNumber parameter is the command that
caused the save operation to take place. The makingCopy parameter has the value
TRUE when the purpose of the save operation is to make a copy of the document;
because this method saves over the original version of the file, makingCopy
should have the value FALSE when SaveInPlace is called. The value of the
copyFInfo parameter is TRUE when this method is to copy all of the existing file
information. The fileName parameter is the name of the file in which to save the
document. The volRefnum parameter is the reference number of the file's volume.
MacApp calls SaveInPlace from TDocument.Save when the makingCopy and
askForFileName parameters are both set to FALSE, and the document cannot or should not
be saved using a temporary file. You never need to call SaveInPlace yourself. You
can override this method to save a disk-based document in place by modifying the
file. If you do, you must set the file’s access permission to a modifiable mode
before doing so.
æKY TDocument.SaveViaTemp
æD PROCEDURE TDocument.SaveViaTemp(itsCmdNumber: CmdNumber;
makingCopy, copyFInfo: BOOLEAN; VAR fileName: Str255; volRefnum: INTEGER);
æFi UMacApp.p
æT METHOD
æC SaveViaTemp saves the document by creating a temporary copy of the file and
renaming it. The caller is responsible for calling the Toolbox routine FlushVol
after using this method. The itsCmdNumber parameter is the command that caused the
save operation to take place. The makingCopy parameter has the value TRUE when
the purpose of the save operation is to make a copy of the document. If
makingCopy is set to TRUE, then SaveViaTemp does not rename the document. The
copyFInfo parameter is set to TRUE when this method is to copy all of the existing
file information. The fileName parameter is the name of the file in which to save
the document. The volRefnum parameter is the reference number of the file's
volume. MacApp always calls SaveViaTemp from TDocument.Save except when it is
saving in place because the fSaveInPlace field is equal to sipAlways or the disk is
full and the user indicated that saving in place was OK. You rarely need to
call SaveViaTemp yourself. Unless you change the way MacApp saves documents, you
usually do not need to override this method.
æKY TDocument.SetChangeCount
æD PROCEDURE TDocument.SetChangeCount(newChangeCount: LONGINT);
æFi UMacApp.p
æT METHOD
æC SetChangeCount sets the document change count to the specified change count. The
newChangeCount parameter specifies the document change count. SetChangeCount
is called by methods that change the document. You usually do not need to call
this method unless you create your own undoable methods that change the
document; those methods must call SetChangeCount.
æKY TDocument.SetTitle
æD PROCEDURE TDocument.SetTitle(aTitle: Str255);
æFi UMacApp.p
æT METHOD
æC SetTitle sets the title of a document and installs the title in all windows
associated with the document. The aTitle parameter is the document's new title.
MacApp calls SetTitle to set the title of a document. This method is called by
TApplication.OpenNew when opening a previously saved document. SetTitle is also
called by TDocument.SavedOn when saving a document to a new file; that is, when
performing a Save As operation. Unless you need to change the document's title,
you usually do not need to call SetTitle yourself. You might override SetTitle
if you need to take additional action or change the action taken when a
document is titled; otherwise, you usually do not need to override this method.
æKY TDocument.SFPutParms
æD PROCEDURE TDocument.SFPutParms(itsCmdNumber: CmdNumber; VAR dlgID: INTEGER;
VAR where: Point; VAR defaultName, prompt: Str255;
VAR dlgHook, filterProc: ProcPtr);
æFi UMacApp.p
æT METHOD
æC SFPutParms returns parameters used to call the Toolbox routine SFPPutFile. The
itsCmdNumber parameter is the command generating the save operation. The dlgID
parameter is the resource ID of the Standard File "put file" dialog box. The
where parameter is the screen location of the top-left corner of the dialog box.
The defaultName parameter is the default filename that appears in the dialog
box. The prompt parameter is a string that is the user prompt displayed in the
dialog box. The dlgHook parameter is a pointer to a dialog "hook" function that
you provide. Your DlgHook function allows you to use a dialog box other than the
one provided by the Standard File package or to handle items in the Standard
File dialog box in a nonstandard way. (For more information on writing this
function, see the “Standard File Package” section of Inside Macintosh.) The
filterProc parameter is a pointer to an event filtering function used by Standard
File. MacApp calls SFPutParms from TDocument.RequestFileName before calling the
Toolbox function SFPPutFile. You usually do not need to call SFPutParms yourself
unless you've overridden TDocument.RequestFileName or wish to use the Toolbox
routine SFPPutFile. You can override SFPutParms if you want to return non-default
values for the parameters MacApp uses to call the Toolbox routine SFPPutFile.
For more information on the exact use of these parameters, see the
"Standard File Package" section of Inside Macintosh.
æKY TDocument.ShowReverted
æD PROCEDURE TDocument.ShowReverted;
æFi UMacApp.p
æT METHOD
æC ShowReverted calls TView.ShowReverted for each view in the document’s view list
(fViewList). MacApp calls ShowReverted from TRevertDocCommand.DoIt when the
user chooses the Revert command and confirms. The revert algorithm assumes you’ve
supplied your own DoRead, DoInitialState, and FreeData methods. You usually do
not need to call ShowReverted yourself. You may override this method if you
want to take additional action or change the action taken to show that a document
has been restored to match the last version saved on the disk.
æKY TDocument.ShowWindows
æD PROCEDURE TDocument.ShowWindows;
æFi UMacApp.p
æT METHOD
æC When a document is opened, ShowWindows opens all of the document's windows
having a value of TRUE in the fOpenInitially field. MacApp calls ShowWindows from
TApplication.OpenNew or TApplication.OpenOld when creating or opening a
document, respectively. You usually do not need to call this method yourself. You can
override this method to change the way of determining which windows are
initially shown when a document is opened.
æKY TDocument.UntitledName
æD PROCEDURE TDocument.UntitledName(VAR noName: Str255);
æFi UMacApp.p
æT METHOD
æC UntitledName supplies a name for a new document and returns it in the noName
parameter. If this method returns the empty string, then the windows are not
renamed according to the value specified in their titles. If you supply a string
consisting of your default document name followed by <<<>>>, this method will
supply a document name that is your default string followed by a number, such as
'MyDocName-1', 'MyDocName-2', and so on. If you supply an empty string for the
noName parameter, this method calls the global routine ParseTitleTemplate to
create a name of the form 'Untitled-n', where n is the number in the global
variable gNumUntitled. This global variable is incremented each time UntitledName is
called, and new documents are thus titled Untitled-1, Untitled-2, and so on.
MacApp calls UntitledName from TApplication.OpenNew when creating a new document;
you usually do not need to call it yourself. You can override UntitledName if
you want to change the way a new document's title is created.
æKY TDynamicArray.ComputeAddress
æD FUNCTION TDynamicArray.ComputeAddress(index: ArrayIndex): Ptr;
æFi UList.p
æT METHOD
æC ComputeAddress returns a pointer to the specified element of the array. The
index parameter specifies the element whose pointer will be returned. Note that the
returned value is a direct heap pointer and should be used with care; the heap
can be compacted across calls that move memory, thus invalidating the pointer.
MacApp uses this method extensively to manipulate the elements of the array.
You can use ComputeAddress in a similar fashion.
æKY TDynamicArray.DeleteElementsAt
æD PROCEDURE TDynamicArray.DeleteElementsAt(index: ArrayIndex; count: ArrayIndex);
æFi UList.p
æT METHOD
æC DeleteElementsAt deletes the elements at the specified index and compresses the
array. The index parameter specifies the element at which deletion should
start. The count parameter specifies the number of elements to delete. MacApp calls
this method to delete elements from a TDynamicArray list or to free such a
list. You usually do not need to call this method yourself.
æKY TDynamicArray.DynamicFields
æD PROCEDURE TDynamicArray.DynamicFields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: integer)); OVERRIDE;
æFi UList.p
æT METHOD
æC DynamicFields reports the contents of each of the TDynamicArray object’s dynamic
areas to the MacApp Inspector. DoToField is a procedure that MacApp passes to
DynamicFields to report the contents of each dynamic field. DynamicFields
iterates over all the TList object’s dynamic fields, performing DoToField on each
one. In this way DynamicFields reports the contents of each dynamic field to the
Inspector. MacApp calls DynamicFields from the Inspector. You must override
this method in your subclasses if you want the Inspector to display your dynamic
fields. Your version of the method should call INHERITED DynamicFields so that
the inherited dynamic fields will also be displayed.
æKY TDynamicArray.EachElementDoTil
æD FUNCTION TDynamicArray.EachElementDoTil
(FUNCTION TestElement(elementIndex: ArrayIndex):Boolean;
IterateForward: Boolean): ArrayIndex;
æFi UList.p
æT METHOD
æC EachElementDoTil is the basic array iterator for dynamic arrays. It calls
TestElement once for each element of the array, in order, until TestElement returns
the value TRUE, and returns the index of the element that satisfied the test. If
no element satisfied the test, the method returns kEmptyIndex. The
elementIndex in the TestElement function is supplied for each element to be tested.
The IterateForward parameter, if set to kIterateForward, indicates that the iteration
is to be done forward through the list; if set to NOT kIterateForward, the
iteration will be done backward. TList.IterateTil calls EachElementDoTil to
iterate through the list. You can use this method in a similar fashion.
æKY TDynamicArray.Fields
æD PROCEDURE TDynamicArray.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: integer)); OVERRIDE;
æFi UList.p
æT METHOD
æC Fields reports the contents of each field of the TDynamicArray object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TDynamicArray object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TDynamicArray.Free
æD PROCEDURE TDynamicArray.Free;
æFi UList.p
æT METHOD
æC Free, if the array is being enumerated, deletes all of the array elements and
marks the fFreeRequested flag so that it can be tested when the enumeration is
completed. If the array is not being enumerated, the Free method calls INHERITED
Free to release the memory used by the TDynamicArray object. TList objects and
TSortedList objects use this method to free themselves. Your overrides of
TDynamicArray methods can use Free in a similar fashion.
æKY TDynamicArray.GetElementsAt
æD PROCEDURE TDynamicArray.GetElementsAt(index: ArrayIndex; ElementPtr: UNIV Ptr;
count: ArrayIndex);
æFi UList.p
æT METHOD
æC GetElementsAt copies the specified number of elements to the specified location.
The index parameter specifies the first element to be copied. The ElementPtr
parameter specifies the location to which the element is to be copied. The count
parameter specifies the number of elements to copy. In MacApp 2.0, the count
can be greater than 1 only if the element size is a power of 2; in other words,
odd-size elements are supported only for single-element operations. MacApp does
not call this method; it is included for your convenience in manipulating
dynamic arrays.
æKY TDynamicArray.GetSize
æD FUNCTION TDynamicArray.GetSize: ArrayIndex;
æFi UList.p
æT METHOD
æC GetSize returns the actual number of elements in the array. MacApp uses the
GetSize method extensively in its manipulation of lists. You can use the method in
a similar fashion.
æKY TDynamicArray.IDynamicArray
æD PROCEDURE TDynamicArray.IDynamicArray(initialSize: ArrayIndex;
elementSize: integer);
æFi UList.p
æT METHOD
æC IDynamicArray initializes a new dynamic array having the specified number of
elements of the specified size. The initialSize parameter specifies the initial
allocated size of the array. The elementSize parameter specifies the size of each
element. TList.IList calls IDynamicArray to initialize the dynamic array. Your
subclasses of TDynamicArray can use this method in a similar fashion.
æKY TDynamicArray.InsertElementsBefore
æD PROCEDURE TDynamicArray.InsertElementsBefore(index: ArrayIndex;
ElementPtr: UNIV Ptr; count: ArrayIndex);
æFi UList.p
æT METHOD
æC InsertElementsBefore inserts elements before the specified element. The method
signals failure if it is unable to change the size of the array. The index
parameter specifies the index of the new element. If the parameter is equal to 1,
the new elements are inserted at the start of the array. If the parameter is
equal to fSize + 1, the new elements are inserted at the end of the array. The
ElementPtr parameter points to the first element to be inserted, and the count
parameter specifies the number of elements to be inserted.For MacApp 2.0, the count
can be greater than 1 only if the element size is a power of 2; in other
words, odd-size elements are supported only for single-element operations.
TDynamicArray.Merge calls InsertElementsBefore to merge two lists into one list, and
TList.InsertBefore calls InsertElementsBefore to insert its elements. You can use
this method in a similar fashion.
æKY TDynamicArray.IsEmpty
æD FUNCTION TDynamicArray.IsEmpty: Boolean;
æFi UList.p
æT METHOD
æC IsEmpty tests if the array is empty or not, and returns the value TRUE if the
array is empty. TView.RemoveSubView calls IsEmpty to test if its list of subviews
is empty. You can use this method in a similar fashion.
æKY TDynamicArray.Merge
æD PROCEDURE TDynamicArray.Merge(aDynamicArray: TDynamicArray);
æFi UList.p
æT METHOD
æC Merge merges the specified array with the current array and leaves aDynamicArray
unchanged. The aDynamicArray parameter specifies the array to be merged with
the current array. MacApp does not call this method; it is included for your
convenience in manipulating dynamic arrays.
æKY TDynamicArray.ReplaceElementsAt
æD PROCEDURE TDynamicArray.ReplaceElementsAt(index: ArrayIndex; ElementPtr: UNIV Ptr;
count: ArrayIndex);
æFi UList.p
æT METHOD
æC ReplaceElementsAt replaces the elements at the specified index. The index
parameter specifies the index of the element to be replaced. The ElementPtr parameter
points to the first element to be copied, and the count parameter specifies
the number of elements to be overwritten. For MacApp 2.0, the count can be
greater than 1 only if the element size is a power of 2. You can call this method to
replace the elements in the array.
æKY TDynamicArray.SetArraySize
æD PROCEDURE TDynamicArray.SetArraySize(theSize: ArrayIndex);
æFi UList.p
æT METHOD
æC SetArraySize sets the array allocation to handle up to the specified number of
elements. The parameter theSize specifies the number of elements to be handled.
TDynamicArray.InsertElementsBefore calls SetArraySize to increase the size of
the array when an element is inserted; similarly, TDynamicArray.DeleteElementsAt
calls SetArraySize to decrease the size of the array when an element is
deleted. You usually do not need to call this method yourself; the array is resized
any time you add or delete elements using the TDynamicArray methods
InsertElementsBefore or DeleteElementsAt. An additional pitfall in calling this method
yourself is that it does not update the array's fSize field; hence, it is possible
to invalidate the count of elements actually in the array.
æKY TEditText.ChangeWrap
æD PROCEDURE TEditText.ChangeWrap(newAutoWrap, redraw: BOOLEAN); OVERRIDE;
æFi UDialog.p
æT METHOD
æC ChangeWrap sets the wrapping behavior of the TEditText object according to the
specified value and, if a TEView is associated with the edit text, sets the
autowrapping behavior for that view to be the same as the behavior for the edit
text. If the newAutoWrap parameter is set to TRUE, then the TEditText object wraps
lines of text, if necessary, to prevent the line from extending farther than
the right edge of the view. If newAutoWrap is set to FALSE, then the TEditText
object allows text lines to be longer than the width of the view, wrapping to a
new line only at carriage returns. If the redraw parameter is set to TRUE, then
the TEditText object redraws the view; otherwise, it does not. MacApp calls
ChangeWrap from TDialogTEView.InstallEditText. You can use this method to control
the wrapping behavior of TEditText views.
æKY TEditText.DoSubstitution
æD PROCEDURE TEditText.DoSubstitution(VAR theText: Str255); OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoSubstitution is overridden to avoid performing substitutions on the view's
text, since you usually will not want to substitute another string for a text item
that can be edited. The parameter theText exists here to make the OVERRIDE
method's declaration match its INHERITED method's declaration line, according to
Object Pascal syntax; however, if you override DoSubstitution you might want to
use theText to pass information to other methods. For example, if the user
enters a numeric value that your application cannot accept, you could uise theText
to pass the illegal value to your failure method and provide an informative
error message, such as "The value x is out of range." MacApp does not call this
method; you usually do not need to do so, either. It is an artifact of method
inheritance and has no function unless you implement one in your override method.
æKY TEditText.Draw
æD PROCEDURE TEditText.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC If the text item is presently being edited, this method calls the TEView
object’s Draw method; otherwise it calls INHERITED Draw, which draws the view using
the global routine MATextBox. The area parameter is the QuickDraw rectangle,
specified in local view coordinates, that defines the boundaries of the view; the
value of this parameter is passed for use by INHERITED Draw. MacApp calls this
method to update a TEditText view. You usually do not need to call it yourself.
æKY TEditText.Fields
æD PROCEDURE TEditText.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TEditText object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TEditText
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TEditText.Free
æD PROCEDURE TEditText.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TDialogTEView object referenced in the
fTEView field, and then calls INHERITED Free to free the memory used by dependent
structures. MacApp calls Free when closing a view containing a TDialogTEView
object. You can call Free to release the memory used by a TEditText object when
you no longer need that object.
æKY TEditText.GetText
æD PROCEDURE TEditText.GetText(VAR theText: Str255); OVERRIDE;
æFi UDialog.p
æT METHOD
æC GetText returns the current text to be substituted in a TDialog view, obtaining
it from the floating TEView if that view is not NIL, and storing it in the
parameter theText. If the value of fTEView is NIL, this method calls INHERITED
GetText to retrieve the string pointed to by the field TStaticText.fDataHandle. If
that field is empty, GetText returns an empty string. When GetText returns, the
parameter theText stores the text string that this method retrieves. The
string stored in theText is to be substituted for parameterized text in a
TDialogView view. MacApp calls GetText from the methods of TEditText, TNumberText,
and TDialogTEView when installing or validating text in dialog boxes. You can use
this method in a similar fashion.
æKY TEditText.HandleMouseDown
æD FUNCTION TEditText.HandleMouseDown(theMouse: VPoint; VAR info: EventInfo; VAR
hysteresis: Point; VAR theCommand: TCommand): BOOLEAN; OVERRIDE;
æFi UDialog.p
æT METHOD
æC HandleMouseDown handles a mouse-down event in the TEditText, returning a
TCommand objectHandleMouseDown processes the specified mouse-down event and returns an
appropriate TCommand object to handle undoable actions. The default version
retrieves the floating text edit view if there is one, and then calls INHERITED
HandleMouseDown. The parameter theMouse is the current position of the mouse
pointer, expressed in local view coordinates. The info parameter is the
information from the Toolbox event record describing the mouse-down event; it is
used to store the mouse-down event, in case the DoMouseCommand method needs to examine
or change its modifiers. The hysteresis parameter is a point that represents
the horizontal and vertical distance the mouse can travel between clicks and
still be considered to be at the same location. MacApp uses this parameter to
determine whether a double click has occurred or if the mouse pointer has moved. The
parameter theCommand is the command object that handles the mouse click.
MacApp calls HandleMouseDown when the user presses the mouse button while the cursor
is within the edit text. You usually do not need to call this method yourself.
æKY TEditText.IEditText
æD PROCEDURE TEditText.IEditText(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsMaxChars: INTEGER);
æFi UDialog.p
æT METHOD
æC IEditText initializes an editable text item and installs it in the given
superview. The record is created with the system’s default text style (gSystemStyle).
The default size of the view is sizeFixed for both the horizontal and vertical
size determiners. The viewable area of the text record is inset by three
pixels. The itsSuperView parameter is the view in which the text (which itself is a
control) appears. The itsLocation parameter is the location of the control in
view coordinates. The itsSize parameter is the size of the control in pixels. The
itsMaxChars parameter specifies the maximum number of characters the record
can accept. The default value of itsMaxChars is MAXINT; change this value if you
want to limit the maximum number of characters to fewer than MAXINT.
æKY TEditText.ImageText
æD PROCEDURE TEditText.ImageText(text: Ptr; Length: LONGINT; box: Rect;
just: INTEGER); OVERRIDE;
æFi UDialog.p
æT METHOD
æC ImageText draws the specified text in the rectangle indicated by the box
parameter with the justification specified by the just parameter. The text parameter
is a pointer to the text to be drawn, and the length parameter indicates the
number of characters in the text. The box parameter is a rectangle (specified in
local coordinates) that must be at least as wide as the first character drawn
(about 20 pixels is usually a good width; see the code in the global routine
MAText box for an algorithm that adjusts this value for varying point sizes). The
just parameter is an integer specifying the type of justification with which to
draw the text.
æKY TEditText.InstallSelection
æD PROCEDURE TEditText.InstallSelection(wasActive, beActive: BOOLEAN); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method calls TDialogTEView’s InstallSelection method if the value of the
TEditText object’s fTEView field is not NIL. Set the wasActive parameter to TRUE
if the TEditText object was the active view before InstallSelection was called;
otherwise, set it to FALSE. Set the beActive parameter to TRUE if you want to
make the TEditText object the active view; otherwise, set it to FALSE. MacApp
calls InstallSelection when the TEditText object or its subview is selected or
deselected. You usually do not need to call this method yourself.
æKY TEditText.IRes
æD PROCEDURE TEditText.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TEditText object from a 'view' resource template. The
fDefChoice field is set to mEditTextHit. The itsDocument parameter specifies the
document associated with the TEditText view. The itsSuperView parameter specifies
the TView object into which the view is to be installed; for a TEditText object,
this is usually a TDialogView or TStaticText object. The itsParams parameter is
a pointer to the portion of the 'view' resource data used to initialize this
view. When the IRes method finishes initializing the view, the method moves the
pointer to the end of this data. MacApp calls this method for each of the views
created from a 'view' resource template, usually in response to a
NewTemplateWindow or a DoCreateViews call. You never need to call IRes yourself.
æKY TEditText.RestartEdit
æD PROCEDURE TEditText.RestartEdit(restartText: Str255);
æFi UDialog.p
æT METHOD
æC RestartEdit focuses and selects the entire TDialogTEView record referenced by
fTEView. The restartText parameter is the editable text string that needs to be
redrawn. MacApp calls RestartEdit after the user dismisses an alert that
obscured the view containing the text being edited. You usually do not need to call
this method yourself.
æKY TEditText.SetJustification
æD PROCEDURE TEditText.SetJustification(theJust: INTEGER; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SetJustification sets the justification of the text in the TEditText view and
the associated TDialogTEView view, redrawing the views if requested. The
parameter theJust is an integer specifying the justification style that the
TStaticText object is to use. Allowed values include
teJustLeft = 0
teJustCenter = 1
teJustRight = -1
teForceLeft = -2
The redraw parameter specifies whether the TEditText view is to redraw its contents
after it sets the justification style; it redraws its contents if redraw is set to
TRUE. MacApp calls SetJustification from TDialogTEView.InstallEditText to set the
justification of the text in a TEditText view. You can use this method in a similar
fashion.
æKY TEditText.SetSelection
æD PROCEDURE TEditText.SetSelection(selStart, selEnd: INTEGER; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method sets the selection range to the text between selStart and selEnd.
The old selection range is unhighlighted, and the new one is highlighted. If
selStart equals selEnd, the selection range is an insertion point, and a caret is
displayed. The selStart parameter is the beginning of the selection; selEnd is
the end. SelEnd and selStart can have values from 0 to 32767. If selEnd is
anywhere beyond the last character of the text, the position just past the last
character is used. If you set the redraw parameter to TRUE, the view is immediately
redrawn to reflect the new selection. If you set the value of the redraw
parameter to FALSE, then the view is not redrawn, even though the new selection may
affect its appearance. You can set redraw to FALSE when you know the view will
be redrawn eventually and you wish to avoid drawing it twice, which makes the
screen appear to flicker.
æKY TEditText.SetText
æD PROCEDURE TEditText.SetText(theText: Str255; redraw: BOOLEAN); OVERRIDE;
æFi UDialog.p
æT METHOD
æC SetText provides a convenient way to set the text in a TEditText object by
directly passing a string, as opposed to creating a StringHandle. The parameter
theText is the string to be substituted in a TDialog view. If you set the value of
the redraw parameter to TRUE, and the view is focused and visible, the view is
redrawn immediately with the new text. If you set the value of the redraw
parameter to FALSE, the view is not redrawn even though the new text may affect its
appearance. You can set redraw to FALSE when you know the view is redrawn
eventually and you wish to avoid drawing it twice, which makes the screen appear to
flash. MacApp calls this method when installing or selecting text in TEditText,
TNumberText, and TDialogTEView views. You can use this method in a similar
fashion.
æKY TEditText.StartEdit
æD PROCEDURE TEditText.StartEdit(selectChars: BOOLEAN; theTEView: TDialogTEView);
æFi UDialog.p
æT METHOD
æC StartEdit installs the present text into the floating TEView. The selectChars
parameter is set to TRUE if all the characters are to be selected. The parameter
theTEView is the floating TDialogTEView in which the user is editing text.
MacApp calls StartEdit from TDialogView.DoSelectEditText when selecting a
TDialogTEView object in which to edit text. You can use this method in a similar
fashion.
æKY TEditText.StopEdit
æD PROCEDURE TEditText.StopEdit;
æFi UDialog.p
æT METHOD
æC This method retrieves the text from the floating TEView, removes itself from its
fTEView, and sets its fDataHandle to the new text. MacApp calls StopEdit when
deselecting the current edit text as part of the process of handling user
choices and carrying out operations on text in dialog boxes. You can use this method
in a similar fashion.
æKY TEditText.Validate
æD FUNCTION TEditText.Validate: LONGINT;
æFi UDialog.p
æT METHOD
æC Validate tests the size of the text in the record associated with the handle
TEHandle. If the number of characters in fText is greater than the value of
fMaxChars, this method returns kTooManyCharacters; otherwise, it returns noErr.
MacApp calls Validate when carrying out operations on text in dialog boxes; you can
use this method in a similar fashion. You can override this method to implement
more sophisticated validation criteria.
æKY TEditText.WRes
æD PROCEDURE TEditText.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TEditText portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TEditText section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and
the size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TEditText.WriteRes
æD PROCEDURE TEditText.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('edit') and
class name ('TEditText') for the ‘view’ resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TEditText object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or
signature.
æKY TEntriesList.Compare
æD FUNCTION TEntriesList.Compare(item1, item2: TObject): INTEGER; OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Compare ranks two items in a list of entries in a TAssociation object based on
the values of their respective fKey fields. The default version requires that
the items be subclasses of TEntry and contain an fKey field. The parameters item1
and item2 are the objects that TEntriesList.Compare ranks by fKey field.
Compare returns one of the constants kItem1LessThanItem2, kItem1EqualItem2, or
kItem1GreaterThanItem2, according to whether the fKey field of item1 is less than,
equal to, or greater than the fKey field of item2. MacApp calls this method when
it inserts entries into a TEntriesList. You probably will not need to call
this method.
æKY TEntriesList.Fields
æD PROCEDURE TEntriesList.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Fields reports the contents of each field of the TEntriesList object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TEntriesList object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TEntriesList.IEntriesList
æD PROCEDURE TEntriesList.IEntriesList;
æFi UAssociation.p
æT METHOD
æC IEntriesList initializes a TEntriesList object. The default method calls
TSortedList.ISortedList. IEntriesList is called by TAssociation.IAssociation; you
usually do not need to call this method yourself.
æKY TEntry.Fields
æD PROCEDURE TEntry.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Fields reports the contents of each field of the TEntry object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TEntry object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TEntry.Free
æD PROCEDURE TEntry.Free; OVERRIDE;
æFi UAssociation.p
æT METHOD
æC Free releases the memory used by the TEntry object and its fields. MacApp calls
this method to dispose of items in a TEntry list. You usually do not need to
call this method.
æKY TEntry.IEntry
æD PROCEDURE TEntry.IEntry(itsKey, itsValue: Str255);
æFi UAssociation.p
æT METHOD
æC IEntry initializes the TEntry object. The itsKey parameter is the string that
becomes the key portion of the TEntry object. The itsValue parameter is the
string that becomes the TEntry object’s value. MacApp calls IEntry from
TAssociation.InsertEntry. You must call IEntry to initialize TEntry objects you create
yourself.
æKY TEntry.SetValue
æD PROCEDURE TEntry.SetValue(VAR value: Str255);
æFi UAssociation.p
æT METHOD
æC SetValue sets the value of the TEntry object. The value parameter becomes the
new value of the entry. MacApp calls SetValue from TAssociation.InsertEntry. You
can use SetValue to assign a value to a TEntry object.
æKY TEvtHandler.AddHandler
æD FUNCTION TEvtHandler.AddHandler(headOfChain: TEvtHandler): TEvtHandler;
æFi UMacApp.p
æT METHOD
æC AddHandler adds itself to the chain of handlers starting at the specified
handler, and returns itself as the new head of the chain. The headOfChain parameter
specifies the handler that is the current head of the chain and that will become
the next handler. TApplication.InstallCoHandler calls this method to add a
handler to the cohandler chain. You probably will not need to call this method
yourself.
æKY TEvtHandler.CommitLastCommand
æD PROCEDURE TEvtHandler.CommitLastCommand;
æFi UMacApp.p
æT METHOD
æC CommitLastCommand, by default, calls the next handler's CommitLastCommand
method. TApplication.CommitLastCommand overrides this method to commit the last
command by calling its Commit method. You usually do not need to call this method
yourself.
æKY TEvtHandler.CreateAView
æD FUNCTION TEvtHandler.CreateAView(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr): TView;
æFi UMacApp.p
æT METHOD
æC This method creates a view object and initializes it. The itsDocument parameter
specifies the document associated with the view. The itsSuperView parameter
specifies a TView object that is the superview of the view this method creates.
The itsParams parameter is a pointer to 'view' resource information that
TEvtHandler.DoCreateViews has read from the view template for the TView object.
CreateAView is called by TEvtHandler.DoCreateViews. You rarely call it yourself.
æKY TEvtHandler.DoChoice
æD PROCEDURE TEvtHandler.DoChoice(origView: TView; itsChoice: INTEGER);
æFi UMacApp.p
æT METHOD
æC The default version of DoChoice calls the DoChoice method of the next handler,
if that handler exists. Subclasses of TEvtHandler can override DoChoice to
perform appropriate actions when processing user-generated events. The origView
parameter contains a reference to the TEvtHandler object to which the current user
event applies. The itsChoice parameter is an integer that specifies the user’s
choice in a dialog box—for example, choosing a command from a pop-up menu or
clicking on a radio button. MacApp calls DoChoice in methods such as TrackMouse,
when a user is manipulating the mouse to operate on a view or group of views.
You can override this method to perform actions in response to mouse clicks in
your TEvtHandler objects.
æKY TEvtHandler.DoCommandKey
æD FUNCTION TEvtHandler.DoCommandKey(ch: Char; VAR info: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC DoCommandKey handles keystrokes made with the Command key pressed, returning the
appropriate TCommand object. If there is no next handler in the chain, this
method returns NIL. The ch parameter is the character that corresponds to the key
the user pressed in combination with the Command key. The info parameter is
the event record description of the key-down event that caused MacApp to call
DoKeyCommand; the info parameter is used to pass information about the event, such
as whether the Option key was pressed. MacApp calls DoCommandKey when a
key-down event is received while the Command key is pressed. You usually do not need
to call this method yourself.
æKY TEvtHandler.DoCreateViews
æD FUNCTION TEvtHandler.DoCreateViews(itsDocument: TDocument; parentView: TView;
itsRsrcID: INTEGER; subViewOffset: VPoint): TView;
æFi UMacApp.p
æT METHOD
æC DoCreateViews locates a specified resource description; it then calls
TEvtHandler.CreateAView, which creates and initializes a view that fits the resource
description. The itsDocument parameter specifies the TDocument object associated
with the view. The parentView parameter specifies the view's superview. The
itsRsrcID parameter specifies the unique integer that MacApp uses to refer to a
resource. In this case, it is the view created by this method. The subViewOffset
parameter specifies where the first subview will be located, in superview
coordinates.
æKY TEvtHandler.DoHandleEvent
æD FUNCTION TEvtHandler.DoHandleEvent(nextEvent: EventRecordPtr;
VAR commandToPerform: TCommand): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC DoHandleEvent handles alien events when called by the application object. The
default method simply returns the value FALSE; you must override this method to
handle your particular type of alien event. The nextEvent parameter is a pointer
to the event record that TApplication.GetEvent obtained from the system. The
commandToPerform parameter is the TCommand object that is created and returned
by this method, or is NIL if the method handled the event. MacApp calls
DoHandleEvent from TApplication.HandleAlienEvent when the event is other than a mouse,
keyboard, window, disk, or app4Evt event. You usually do not need to call this
method yourself; however you must override it if your application handles
non-standard events. Your override method should return TRUE if it can handle an
event, passing the appropriate command object in the commandToPerform parameter;
otherwise it should return FALSE. If your override handles the event without
creating a command object, it should return NIL in the commandToPerform parameter.
æKY TEvtHandler.DoHelp
æD FUNCTION TEvtHandler.DoHelp(VAR info: EventInfo;
VAR message: UNIV LONGINT): TCommand;
æFi UMacApp.p
æT METHOD
æC DoHelp, when overridden, implements context-sensitive user help for commands to
which it can respond; if it can’t respond to a command, it must call the DoHelp
method of the next object in the target chain. The default version of this
method simply calls the DoHelp method of the next handler in the chain. If there
is no next handler, this method returns NIL. The info parameter is the event for
which the user wants help; information contained in the parameter is read from
the Toolbox event record. The message parameter is the help message that your
override method returns. MacApp calls DoHelp from TTranscriptView.DoKeyCommand.
You can call DoHelp from any event handler that you define to provide help
information. You must override DoHelp to provide help text.
æKY TEvtHandler.DoIdle
æD FUNCTION TEvtHandler.DoIdle(phase: IdlePhase): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC DoIdle, when overridden, is called to do tasks for your application at idle time
and returns the value TRUE if the TEvtHandler object frees itself. The default
version simply returns FALSE; you must override this method to provide useful
behavior. The phase parameter can have the values idleBegin, idleContinue, or
idleEnd. MacApp sets the value of the phase parameter to idleBegin when there
are no events to be handled in the event record; this value tells DoIdle to pass
control to the first handler in the idle chain. MacApp sets the value of the
phase parameter to idleContinue when the first cohandler in the chain has
completed its task and there still are no events posted in the event record; this
value tells DoIdle to pass control to the next cohandler in the chain. MacApp sets
the value of the phase parameter to idleEnd when an event is posted in the
event record; this value tells DoIdle to pass control to the command chain or click
chain, as appropriate. You must always override DoIdle and set the fIdleFreq
field appropriately if you need to process at idle time, because MacApp cannot
know the needs of your particular application. Normally this method returns
FALSE; however, if your override removes the TEvtHandler object from the cohandler
chain and frees the object, then the override must return TRUE.
æKY TEvtHandler.DoKeyCommand
æD FUNCTION TEvtHandler.DoKeyCommand(ch: Char; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand;
æFi UMacApp.p
æT METHOD
æC DoKeyCommand handles keystrokes made without the Command key pressed, returning
the appropriate TCommand object. The ch parameter is the alphanumeric character
that corresponds to the key the user pressed. The aKeyCode parameter is the
ASCII key code generated by the keystroke. The info parameter is the event record
description of the event that caused MacApp to call DoKeyCommand; the info
parameter is used to pass information about the event, such as whether the Option
key was pressed. MacApp calls DoKeyCommand when the user presses a key on the
keyboard. You usually do not need to override this method or call it yourself.
æKY TEvtHandler.DoMenuCommand
æD FUNCTION TEvtHandler.DoMenuCommand(aCmdNumber: CmdNumber): TCommand;
æFi UMacApp.p
æT METHOD
æC DoMenuCommand, when overridden, must perform the appropriate actions to process
a user’s menu selection. Your override method performs simple commands passed
to it in the aCmdNumber parameter and returns NIL; it must return a TCommand
object to handle complex commands. Commands it cannot handle must be passed back
to the command chain by calling INHERITED DoMenuCommand. The parameter
aCmdNumber is the command number defined for the selected menu item. MacApp predefines
certain command numbers as constants in the file UMacApp.p; you can define
others in your 'cmnu' resource description and in the appropriate interface or
implementation file. MacApp calls DoMenuCommand when the user chooses a command from
a menu. You usually do not need to call this method yourself.
æKY TEvtHandler.DoMultiClick
æD FUNCTION TEvtHandler.DoMultiClick(lastDownPt, newDownPt: Point): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC DoMultiClick returns the value TRUE if two mouse clicks are close enough
together to be considered part of a double or triple click. If the sum of the x and y
distances, in global coordinates, between the points is less than or equal to
the value of gStdHysteresis, then the clicks are considered parts of a multiple
click. The lastDownPt parameter specifies the location, in global coordinates,
of the first of two clicks. The newDownPt parameter specifies the location, in
global coordinates, of the second of two clicks. A triple click is handled as
two double clicks, the first being clicks one and two, and the second being
clicks two and three. DoMultiClick is called by TApplication.CountClicks. You
usually do not need to call this method yourself.
æKY TEvtHandler.DoSetupMenus
æD PROCEDURE TEvtHandler.DoSetupMenus;
æFi UMacApp.p
æT METHOD
æC DoSetupMenus simply calls the DoSetupMenus method of the next handler in the
chain. If you override this method in your subclasses, your override must call
INHERITED DoSetupMenus as its first action, to allow other handlers to enable menu
items to which they can respond. MacApp calls DoSetupMenus from the
DoSetupMenus methods of other classes and from TApplication.SetupTheMenus. You usually
do not need to call this method yourself, but you can call it to make certain
that necessary menu items are enabled.
æKY TEvtHandler.EachHandler
æD PROCEDURE TEvtHandler.EachHandler
(PROCEDURE DoToEvtHandler(anEvtHandler: TEvtHandler));
æFi UMacApp.p
æT METHOD
æC EachHandler performs the DoToEvtHandler procedure on each event handler in a
linked list of event handlers—for example, on the handlers in either the target
chain or the cohandler chain. DoToEvtHandler is a procedure that you define and
pass to EachHandler. The procedure you define can have any name, just as
variables that you pass as arguments can have any name. The procedure passed in
DoToEvtHandler must take a single parameter of type TEvtHandler, which is the
anEvtHandler parameter. EachHandler performs the DoToEvtHandler procedure on the
current handler, then down the handler chain, and so on, until the value of
fNextHandler is NIL, indicating that the procedure has reached the end of the list of
event handlers. In this way, the EachHandler procedure iterates over all entries
in the event handler list, binding each one in turn to the anEvtHandler
parameter and executing the passed procedure. MacApp calls EachHandler to traverse
the cohandler chain when the application is idling and to free each handler in
the chain when closing the application. You can call this method to perform an
operation on each handler in your application's target or cohandler chain.
æKY TEvtHandler.Fields
æD PROCEDURE TEvtHandler.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TEvtHandler object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TEvtHandler object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action
to ensure that the inherited fields are also displayed.
æKY TEvtHandler.FirstHandlerThat
æD FUNCTION TEvtHandler.FirstHandlerThat
(FUNCTION TestEvtHandler(anEvtHandler: TEvtHandler): BOOLEAN): TEvtHandler;
æFi UMacApp.p
æT METHOD
æC FirstHandlerThat returns from a linked list of event handlers the first item
that meets specified criteria. If no item satisfies the criteria, FirstHandlerThat
returns NIL. TestEvtHandler is a function that you define and pass to
FirstHandlerThat. The function you define can have any name, just as variables that
you pass as arguments can have any name. The function passed in TestEvtHandler
must take a single parameter of type TEvtHandler, which is the anEvtHandler
parameter. FirstHandlerThat performs the TestEvtHandler function to the current
handler, then to its fNextHandler, and so on, until either the value of fNextHandler
is NIL, indicating that the function has reached the end of the list of event
handlers, or the function TestEvtHandler returns the value TRUE. In this way,
the FirstHandlerThat function iterates over all entries in the event handler
list, binding each one in turn to the anEvtHandler parameter and executing the
passed function. MacApp calls FirstHandlerThat to find the first handler that
satisfies some criteria in an event handler list. For example, this method call can
be in response to an alien event—that is, one not handled by the normal
complement of event handlers in MacApp. You can use this method for similar purposes.
æKY TEvtHandler.Free
æD PROCEDURE TEvtHandler.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free cleans up the target chain, releases the memory used by the TEvtHandler
object, and calls INHERITED Free to perform any auxiliary cleanup that may be
necessary, such as freeing other objects to which the TEvtHandler object contains
references. MacApp calls Free to dispose of TEvtHandler objects. You usually do
not need to call this method.
æKY TEvtHandler.GetLastCommand
æD FUNCTION TEvtHandler.GetLastCommand: TCommand;
æFi UMacApp.p
æT METHOD
æC GetLastCommand, by default, passes the request for the last command to the next
handler. The command returned is not yet committed. TApplication.GetLastCommand
overrides this method to return the last undoable command. You usually do not
need to call this method yourself.
æKY TEvtHandler.GetNextCommand
æD FUNCTION TEvtHandler.GetNextCommand: TCommand;
æFi UMacApp.p
æT METHOD
æC GetNextCommand, by default, passes the request for the next command to the next
handler. TApplication.GetNextCommand overrides this method to return the next
command to be executed in the command queue, or NIL if there are no queued
commands. You usually do not need to call this method yourself.
æKY TEvtHandler.HandlesPrintingCommands
æD FUNCTION TEvtHandler.HandlesPrintingCommands: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC This function calls the HandlesPrintingCommands method of the next handler in
the chain and returns the value of that call; it is TRUE if that handler can
handle printing commands. If there is no next handler, this method returns the
value FALSE.
æKY TEvtHandler.IdentifySoftware
æD PROCEDURE TEvtHandler.IdentifySoftware;
æFi UMacApp.p
æT METHOD
æC This method is overridden in its subclasses to write a string to the debug
transcript with information about the version of MacApp used to create the
application. Typically the override then calls INHERITED IdentifySoftware to pass
this message on to the next handler in the chain. The default version of
TEvtHandler.IdentifySoftware simply passes control to the next handler. MacApp calls
this method when the user issues the Identify Software command in the MacApp
debugger. You usually do not need to call this method yourself. You can override this
method to add further information to the debug transcript.
æKY TEvtHandler.IEvtHandler
æD PROCEDURE TEvtHandler.IEvtHandler(itsNextHandler: TEvtHandler);
æFi UMacApp.p
æT METHOD
æC IEvtHandler initializes an event handler, setting values for fNextHandler,
fIdleFreq, and fLastIdle. The itsNextHandler parameter specifies the next handler in
the chain. TEvtHandler assumes the new handler never wants idle time, and sets
fIdleFreq to kMaxIdleTime and fLastIdle to 0. MacApp calls IEvtHandler from a
variety of other classes’ initialization methods. You may call this method from
the initialization methods of your subclasses that create event handlers—for
example, when you create a cohandler.
æKY TEvtHandler.InstallSelection
æD PROCEDURE TEvtHandler.InstallSelection(wasActive, beActive: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC InstallSelection, when overridden, must install the selection after the target
window is activated or deactivated. This is an empty method; your subclasses
must override it to provide any useful behavior. Set the wasActive parameter to
TRUE if the target window was the active window before InstallSelection was
called; otherwise, set it to FALSE. Set the beActive parameter to TRUE if you want
to make the target window the active window; otherwise, set it to FALSE. MacApp
calls InstallSelection from methods that change the active window or view. You
can use this method to make a view active and ensure that its selection appears
correctly.
æKY TEvtHandler.KeyEventToComponents
æD PROCEDURE TEvtHandler.KeyEventToComponents(VAR info: EventInfo);
æFi UMacApp.p
æT METHOD
æC KeyEventToComponents, when overridden, must extract an event’s character
components using techniques compatible with the Script Manager. The default method
passes the information to the next handler, if there is one. If there is no next
handler, the method extracts the character and the ASCII key code from the
information in the info parameter. The info parameter is the event record
description of the event. MacApp calls this method when it receives a key-down event
from the system; you usually do not need to call this method.
æKY TEvtHandler.LookupSymbol
æD FUNCTION TEvtHandler.LookupSymbol(VAR sym: Str255): LONGINT;
æFi UMacApp.p
æT METHOD
æC LookupSymbol translates a symbol to a number and returns it as a LONGINT value
for use by the MacApp debugger. The sym parameter specifies an ASCII character
that is the symbol to be translated. If the value of sym is '?' then
LookupSymbol writes a list of available symbols to the Debug Transcript. You must
override LookupSymbol in your classes if you want to handle any special symbols that
are not processed by the default behavior. You usually do not need to call this
method yourself.
æKY TEvtHandler.PerformCommand
æD PROCEDURE TEvtHandler.PerformCommand(command: TCommand);
æFi UMacApp.p
æT METHOD
æC PerformCommand, by default, passes the command to the next handler.
TApplication.PerformCommand overrides this method to perform the specified command.
The command parameter is the TCommand object created to perform the command. MacApp
calls this method from the HandleEvent and PollEvent methods of both the
TApplication and TDebugApplication classes. You normally execute command objects by
calling TEvtHandler.PostCommand to post them to the command queue; however, if
you need to execute an existing command immediately you can call
PerformCommand.
æKY TEvtHandler.PostCommand
æD PROCEDURE TEvtHandler.PostCommand(command: TCommand);
æFi UMacApp.p
æT METHOD
æC PostCommand, by default, passes the command to the next handler.
TApplication.PostCommand overrides this method to post the specified command to the
command queue for later execution. The command parameter is the TCommand object to be
posted to the command queue. You call this method to post the command to a command
queue.
æKY TEvtHandler.RemoveHandler
æD FUNCTION TEvtHandler.RemoveHandler(headOfChain: TEvtHandler): TEvtHandler;
æFi UMacApp.p
æT METHOD
æC RemoveHandler removes SELF from the chain of handlers starting at the specified
handler and returns the new head of the chain. If SELF was the head of the
chain, then there must be a new head of the chain. The headOfChain parameter
specifies the handler at which to start. MacApp calls this method from
TApplication.InstallCohandler to remove the first cohandler in the chain when the
addIt parameter is FALSE. Rather than calling this method yourself, you should call
InstallCohandler with the addIt parameter set to FALSE when you want to remove the
first cohandler in the chain.
æKY TEvtHandler.SetIdleFreq
æD PROCEDURE TEvtHandler.SetIdleFreq(newIdleFreq: Longint);
æFi UMacApp.p
æT METHOD
æC SetIdleFreq sets the handler's idle frequency as specified. The newIdleFreq
specifies the new idling frequency in ticks. The maximum idle frequency is 0, and
the minimum idle frequency is kMaxIdleTime. MacApp calls this method to force
the application to idle immediately—for example, when the user has just selected
a new insertion point and the appliaction must cause it to flash. MacApp also
calls SetIdleFreq to allow the application other amounts of idle time, or none
at all. You can use this method in a similar fashion.
æKY TEvtHandler.Terminate
æD PROCEDURE TEvtHandler.Terminate;
æFi UMacApp.p
æT METHOD
æC Terminate executes when an application is about to terminate. The default method
is empty; your subclasses must override it to perform any special procedures
necessary just before your application terminates. MacApp calls this method from
TApplication.Close. Do not call the Terminate method yourself.
æKY TGridView.AdornCol
æD PROCEDURE TGridView.AdornCol(aCol: INTEGER; area: Rect);
æFi UGridView.p
æT METHOD
æC When the value of the fAdornCol field is TRUE, this method is called to draw the
column adornment. AdornCol is an empty method; you must supply the code to
adorn columns in whatever way you choose. The parameter aCol is the index of the
column to be adorned (the leftmost column in a TGridView object is numbered 1).
The area parameter is the rectangle occupied by the column in the TGridView
object’s local coordinates. MacApp calls AdornCol when it draws a TGridView
object. You usually do not need to call this method yourself.
æKY TGridView.AdornRow
æD PROCEDURE TGridView.AdornRow(aRow: INTEGER; area: Rect);
æFi UGridView.p
æT METHOD
æC When the value of the fAdornRow field is TRUE, this method is called to draw the
row adornment. AdornRow is an empty method; you must supply the code to adorn
rows in whatever way you choose. The aRow parameter is the index of the row to
be adorned (the topmost row in a TGridView object is numbered 1). The area
parameter is the rectangle occupied by the row in the TGridView object’s local
coordinates. MacApp calls AdornRow when it draws a TGridView object. You usually do
not need to call this method yourself.
æKY TGridView.AllCellsDo
æD PROCEDURE TGridView.AllCellsDo(PROCEDURE DoToCell(aCell: GridCell));
æFi UGridView.p
æT METHOD
æC AllCellsDo performs the DoToCell procedure on each cell in the view. DoToCell is
a procedure that you pass to AllCellsDo. This procedure is performed on each
of the TGridView object’s cells in turn. You must declare and implement the
DoToCell procedure yourself. The procedure you write can have any name that does
not conflict with other procedures in the scope of the TGridView class. Just as
you can create any variable of the proper type and pass it as an argument to a
procedure, you can create any procedure and pass it to AllCellsDo, as long as
the procedure accepts one argument of type GridCell. This procedure is bound to
the formal parameter DoToCell and then is called, binding each cell in the
TGridView object in turn to aCell. In this way AllCellsDo iterates over all the
cells in the object, performing the procedure you define on each one. MacApp never
calls AllCellsDo; this method is provided for your use when you need to perform
an operation on all cells in a TGridView object.
æKY TGridView.CalcMinSize
æD PROCEDURE TGridView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
æFi UGridView.p
æT METHOD
æC CalcMinSize calculates the minimum dimensions of the TGridView object. The
minSize parameter contains the calculated size, represented as a view point, when
the method returns. MacApp calls CalcMinSize when resizing the view. You usually
do not need to call this method yourself.
æKY TGridView.CanSelectCell
æD FUNCTION TGridView.CanSelectCell(aCell: GridCell): BOOLEAN;
æFi UGridView.p
æT METHOD
æC CanSelectCell returns the value TRUE if the specified cell can be selected. The
default version of this method performs a range check on a cell and returns the
value TRUE if the cell falls within the grid's boundaries. The aCell parameter
specifies the cell to test. MacApp calls CanSelectCell in response to a mouse
click in the TGridView object. You can override this method to determine
whether a particular cell can be selected according to conditions that you define.
æKY TGridView.CellsToPixels
æD PROCEDURE TGridView.CellsToPixels(theCells, thePixels: RgnHandle);
æFi UGridView.p
æT METHOD
æC CellsToPixels converts cells into a region of pixels that covers those cells.
The theCells parameter is a handle to a QuickDraw region that represents some
part of the TGridView object. When the method returns, the parameter thePixels is
a handle to a region that contains the QuickDraw coordinates of the cells in
the region defined by the parameter theCells. MacApp calls CellsToPixels from
methods that need to perform QuickDraw operations, such as highlighting, on a
given group of cells. You usually do not need to call CellsToPixels yourself.
æKY TGridView.CellToVRect
æD PROCEDURE TGridView.CellToVRect(aCell: GridCell; VAR aRect: VRect);
æFi UGridView.p
æT METHOD
æC CellToVRect calculates the view coordinates of the rectangle that surrounds the
specified cell. The calculated rectangle includes the row and column insets of
the cell. The aCell parameter specifies the cell whose rectangle is to be
calculated. The aRect parameter contains the calculated rectangle when the method
returns. MacApp calls CellToVRect from a variety of methods that draw, highlight,
select, or otherwise manipulate cells in a TGridView object in a way that
requires knowing the defining rectangle of a cell. You can use this method in a
similar manner.
æKY TGridView.ColToVRect
æD PROCEDURE TGridView.ColToVRect(aCol: INTEGER; numOfCols: INTEGER;
VAR aRect: VRect);
æFi UGridView.p
æT METHOD
æC ColToVRect calculates the rectangle that bounds the specified columns. The aCol
parameter is the number of the column whose rectangle is to be calculated.
Columns are numbered from left to right; the leftmost column is number 1. The
numOfCols parameter is the number of columns to include in the rectangle
calculation. The aRect parameter contains the calculated rectangle when the method
returns. MacApp calls this method from a variety of methods that must determine the
defining rectangle of one or more columns. You can use ColToVRect in a similar
fashion.
æKY TGridView.DelColAt
æD PROCEDURE TGridView.DelColAt(aCol: INTEGER; numOfCols: INTEGER);
æFi UGridView.p
æT METHOD
æC DelColAt deletes the specified column or columns and causes the remaining cells
to be redrawn. The aCol parameter is the index of the first column to be
deleted. Columns are numbered from left to right; the leftmost column is number 1.
The numOfCols parameter is the number of columns to delete. MacApp calls DelColAt
from methods that can delete a column in a grid—for example,
TGridView.DelColFirst and TGridView.DelColLast. You can use this method in a similar
fashion.
æKY TGridView.DelColFirst
æD PROCEDURE TGridView.DelColFirst(numOfCols: INTEGER);
æFi UGridView.p
æT METHOD
æC DelColFirst deletes the specified column or columns, starting with the leftmost,
in a TGridView object. The numOfCols parameter is the number of columns to
delete. MacApp never calls DelColFirst; it is provided for your convenience. You
can use DelColFirst when you need to delete one or more columns, starting at the
left, from a grid view.
æKY TGridView.DelColLast
æD PROCEDURE TGridView.DelColLast(numOfCols: INTEGER);
æFi UGridView.p
æT METHOD
æC DelColLast deletes the specified number of columns, starting with the rightmost,
in a TGridView object. The numOfCols parameter is the number of columns to
delete. MacApp never calls DelColLast; it is provided for your convenience. You
can use DelColLast when you need to delete one or more columns, starting at the
right, from a grid view.
æKY TGridView.DelRowAt
æD PROCEDURE TGridView.DelRowAt(aRow: INTEGER; numOfRows: INTEGER);
æFi UGridView.p
æT METHOD
æC DelRowAt deletes the specified row or rows and causes the remaining cells to be
redrawn. The aRow parameter is the index of the row to be deleted. Rows are
numbered from top to bottom; the top row is number 1. The numOfRows parameter is
the number of rows to delete. MacApp calls DelRowAt from certain methods that
can delete a column in a grid—for example, TGridView.DelRowFirst and
TTextListView.DelItemAt both accomplish their respective tasks by calling DelRowAt
with the appropriate parameters. You can use this method in a similar fashion.
æKY TGridView.DelRowFirst
æD PROCEDURE TGridView.DelRowFirst(numOfRows: INTEGER);
æFi UGridView.p
æT METHOD
æC DelRowFirst deletes the first (that is, the topmost) row or rows in a TGridView
object. The numOfRows parameter specifies the number of rows to delete. MacApp
does not call DelRowFirst; it is provided for your convenience. You can use
DelRowFirst when you need to delete one or more rows from the top.
æKY TGridView.DelRowLast
æD PROCEDURE TGridView.DelRowLast(numOfRows: INTEGER);
æFi UGridView.p
æT METHOD
æC DelRowLast deletes the last (that is, the bottom) row or rows in a TGridView
object. The parameter numOfRows is the number of rows to delete. MacApp does not
call DelRowLast; it is provided for your convenience. You can use DelRowLast
when you need to delete one or more rows from the bottom of a grid view.
æKY TGridView.DoHighlightSelection
æD PROCEDURE TGridView.DoHighlightSelection(fromHL, toHL: HLState); OVERRIDE;
æFi UGridView.p
æT METHOD
æC DoHighlightSelection highlights the specified cells in the TGridView object. The
default version calls HighlightCells. The parameter fromHL is the selection’s
original highlight state; the toHL parameter is the desired highlight state.
Possible highlight states are hlOff (selection is not highlighted), hlDim
(selection is dimmed), and hlOn (selection is highlighted). MacApp calls
DoHighlightSelection when selecting cells, when drawing or activating views, and when
changing a selection’s highlight state. You usually do not need to call this method
yourself.
æKY TGridView.DoMouseCommand
æD FUNCTION TGridView.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UGridView.p
æT METHOD
æC DoMouseCommand performs the appropriate actions to process a mouse click in a
TGridView object, returning an appropriate TCommand object to handle the command.
If the mouse click is not within the boundaries of a TGridView cell, this
method returns NIL. The parameter theMouse is the mouse pointer’s current location,
described in view coordinates. The info parameter is the event record of the
mouse-down event that caused DoMouseCommand to be called. The hysteresis
parameter is a point that represents the horizontal and vertical distance the mouse
can travel between clicks and still be considered to be at the same location.
MacApp uses this parameter to determine whether a double click has occurred or if
a control has moved. MacApp calls DoMouseCommand when a mouse click occurs
within the view. You usually do not need to call this method yourself.
æKY TGridView.Draw
æD PROCEDURE TGridView.Draw(area: Rect); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Draw calls the TGridView methods DrawRangeOfCells, AdornRow, and AdornCol for
all cells in the specified area. The area parameter is a QuickDraw rectangle,
described in local coordinates, that defines the part of the view that needs to be
redrawn. TGridView methods use this parameter to optimize drawing speed.
MacApp calls Draw to redraw a TGridView object. You usually do not need to call this
method yourself. However, you must override the empty method
TGridView.DrawCell to draw the cell and its contents; it is called indirectly by Draw.
æKY TGridView.DrawCell
æD PROCEDURE TGridView.DrawCell(aCell: GridCell; aQDRect: Rect);
æFi UGridView.p
æT METHOD
æC DrawCell draws an individual cell in a TGridView object. The aCell parameter is
the cell to be redrawn. The aQDRect parameter is the rectangle that defines the
cell. MacApp calls this method to draw a TGridView cell. You must override
DrawCell to draw the cell and its contents; the default version does nothing.
æKY TGridView.DrawRangeOfCells
æD PROCEDURE TGridView.DrawRangeOfCells(startCell, stopCell: GridCell; aQDRect: Rect);
æFi UGridView.p
æT METHOD
æC DrawRangeOfCells calls the DrawCell method for each specified cell in the
TGridView object. The parameters startCell and stopCell specify the first and last
cells to draw. The aQDRect parameter defines a rectangle, in local QuickDraw
coordinates, that contains the range of cells bounded by startCell and stopCell.
MacApp calls DrawRangeOfCells from TGridView.Draw. You usually do not need to
call this method yourself; however you must override the empty method
TGridView.DrawCell to draw the cell and its contents.
æKY TGridView.EachCellDo
æD PROCEDURE TGridView.EachCellDo(startCell, stopCell: GridCell;
PROCEDURE DoToCell(aCell: GridCell));
æFi UGridView.p
æT METHOD
æC EachCellDo performs the procedure DoToCell for each specified cell in the
TGridView object. The parameters startCell and stopCell specify the starting and
ending cells in the sequence to be processed. DoToCell is the procedure that
operates on each cell in the sequence. You must define the procedure DoToCell
yourself. It can have any name you like, just as the variables you pass in the other
parameters can have any name you like. The procedure you pass must accept a
single parameter of type GridCell. MacApp iterates over all the cells in the range
specified by startCell and stopCell, binding each one in turn to the formal
parameter aCell. In this way EachCellDo can perform any procedure of your choosing
on each of a sequence of cells in a grid. MacApp uses EachCellDo to iterate
over ranges of cells, performing some operation on each one. You can use it in a
similar fashion.
æKY TGridView.EachInRgn
æD PROCEDURE TGridView.EachInRgn(aRgn: RgnHandle; PROCEDURE DoToCell(aCell: GridCell));
æFi UGridView.p
æT METHOD
æC EachInRgn performs the specified procedure on each cell in the specified region.
The parameter aRgn is a handle to a QuickDraw region that represents the cells
to be processed. DoToCell is the procedure that operates on each cell in the
region. You must define the procedure DoToCell yourself. It can have any name
you like, just as the variables you pass in the other parameters can have any
name you like. The procedure you pass must accept a single parameter of type
GridCell. MacApp iterates over all the cells in the region specified, binding each
one in turn to the formal parameter aCell. In this way EachInRgn can perform any
procedure of your choosing on each of a sequence of cells in a grid. MacApp
calls EachInRgn to perform certain operations on a range of cells in a grid. You
can use it in a similar fashion.
æKY TGridView.EachSelectedCellDo
æD PROCEDURE TGridView.EachSelectedCellDo(PROCEDURE DoToCell(aCell: GridCell));
æFi UGridView.p
æT METHOD
æC EachSelectedCellDo performs the procedure DoToCell for each selected cell.
DoToCell is the procedure that operates on each cell in the selection. You must
define the procedure DoToCell yourself. It can have any name you like, just as the
variables you pass in the other parameters can have any name you like. The
procedure you pass must accept a single parameter of type GridCell. MacApp iterates
over all the cells in the selected region, binding each one in turn to the
formal parameter aCell. In this way, EachSelectedCellDo can perform any procedure
of your choosing on each of a sequence of selected cells. MacApp calls
EachSelectedCellDo from methods that perform operations on groups of selected cells.
You can use this method in a similar fashion.
æKY TGridView.Fields
æD PROCEDURE TGridView.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TGridView object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TGridView
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TGridView.FirstSelectedCell
æD FUNCTION TGridView.FirstSelectedCell: GridCell;
æFi UGridView.p
æT METHOD
æC FirstSelectedCell returns the top-left cell in the selected range. This method
checks cells from left to right in the topmost row of the selection and then
checks the row below the one just checked; therefore, it is possible for this
method to return a cell that is located further to the right than any others in the
selection if that cell is the topmost one in the selection. If no cells are
selected, then FirstSelectedCell returns a null cell having coordinates (0,0).
MacApp calls FirstSelectedCell from TTextListView.FirstSelectedItem to obtain a
reference to first selected item of a range in a TTextListView object. You can
use FirstSelectedCell to retrieve the first in a selected range of cells in a
TGridView object.
æKY TGridView.Free
æD PROCEDURE TGridView.Free; OVERRIDE;
æFi UGridView.p
æT METHOD
æC Free releases the memory used by the TGridView object and then calls INHERITED
Free. MacApp calls Free to dispose of TGridView objects when they are no longer
needed—for example, when the window containing the TGridView view is closed.
You can use this method in a similar fashion. You can override Free when your
subclass has additional fields that need to be freed.
æKY TGridView.GetColWidth
æD FUNCTION TGridView.GetColWidth(aCol: INTEGER): INTEGER;
æFi UGridView.p
æT METHOD
æC GetColWidth returns the width of the specified column. The aCol parameter
specifies the column whose width is to be returned. Columns are numbered from 1 to
the value of the fNumOfRows field, starting with the leftmost column. MacApp
calls GetColWidth from a variety of methods, such as TGridView.DrawCell and
TGridView.ColToVRect, that must determine the width of a column or of a cell in a
column. You can use this method in a similar fashion.
æKY TGridView.GetRowHeight
æD FUNCTION TGridView.GetRowHeight(aRow: INTEGER): INTEGER;
æFi UGridView.p
æT METHOD
æC GetRowHeight returns the height, in pixels, of the specified row. The aRow
parameter specifies the row whose height is to be returned. Rows are numbered from 1
to the value of the fNumOfRows field, starting with the top row. MacApp calls
GetRowHeight from a variety of methods, such as TGridView.Draw, that must
determine the height of a row or of a cell in a row. You can use this method in a
similar fashion.
æKY TGridView.HighlightCells
æD PROCEDURE TGridView.HighlightCells(theCells: RgnHandle; fromHL, toHL: HLState);
æFi UGridView.p
æT METHOD
æC HighlightCells changes the specified cells' highlight state as specified and
performs the highlighting. The parameter theCells is a handle to a region that
contains the cells to be affected. The fromHL parameter specifies the cells'
highlight state when this method is called; the toHL parameter specifies the desired
highlight state. Possible highlight states are hlOff (the cells are not
highlighted) and hlOn (the cells are highlighted). Dim highlighting is not supported
Because TGridView does not support dim highlighting, the highlight state hlDim
is equivalent to hlOff. MacApp calls HighlightCells from methods that highlight
the selected cells in a TGridView object, such as
TGridView.DoHighlightSelection and TGridView.SetSelectedCells. You usually do not
need to call this method yourself.
æKY TGridView.IdentifyPoint
æD FUNCTION TGridView.IdentifyPoint(theQDPoint: Point;
VAR aRow, aCol: INTEGER): GridViewPart;
æFi UGridView.p
æT METHOD
æC IdentifyPoint returns the part identifier that corresponds to the portion of the
grid view in which the specified point lies. Possible part identifiers are
inCell, inRow, inColumn, and inVertex. Each part identifier corresponds to the
part of a grid suggested by its name; for example, if IdentifyPoint returns inRow,
then the specified point was in a row but not in a cell. The identifer
inVertex is returned if the point is in the area where a row and column intersect. The
parameter theQDPoint is the QuickDraw point to be converted. When the method
returns, the aRow and aCol parameters specify, respectively, the row and column
containing the point being tested. MacApp calls IdentifyPoint from
TGridView.DoMouseCommand. You can use it when you need to determine what part of a
grid view contains a particular point.
æKY TGridView.IGridView
æD PROCEDURE TGridView.IGridView(itsDocument: TDocument; itsSuperView: TView;
itsLocation: VPoint; itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer;
numOfRows: INTEGER; numOfCols: INTEGER; rowHeight: INTEGER; colWidth: INTEGER;
adornRows: BOOLEAN; adornCols: BOOLEAN; rowInset: INTEGER; colInset: INTEGER;
singleSelection: BOOLEAN);
æFi UGridView.p
æT METHOD
æC IGridView initializes the TGridView object. The itsDocument parameter is the
TGridView object's document. The itsSuperView parameter is the TView object in
which the TGridView object is installed; this object is usually an instance of
TWindow or TScroller. The itsLocation parameter is the top-left corner of the
TGridView object in the superview’s local coordinates. The itsSize parameter is the
bottom-right corner of the TGridView object in the superview’s local
coordinates (this parameter is ignored for the appropriate dimension if the
itsHSizeDet or itsVSizeDet parameter is sizeVariable). The itsHSizeDet parameter
specifies the horizontal size determiner for the view, and the itsVSizeDet parameter
specifies the corresponding vertical size determiner. A size determiner specifies
how a view’s size is to be calculated. The valid size determiners include
sizeSuperView (the view is the same size as its superview), sizeRelSuperView (the
view size is computed relative to the superview’s size), sizePage (the view is to
be the size of one page), sizeFillPages (the view is to grow upward to fill an
exact number of pages), sizeVariable (the view’s size fluctuates according to
criteria specified by the application), and sizeFixed (the size of the view
always remains the same as when it is first created). The numOfRows parameter
specifies the initial number of rows in the grid, and the numOfCols parameter is the
initial number of columns. The rowHeight parameter specifies the height, in
pixels, of each row, and the colWidth parameter specifies the width, in pixels,
of each column. The parameters adornRows and adornCols are Boolean values that
determine whether the AdornRow and AdornCol methods are to be called when the
view is drawn. Normally you refer to the values of adornRows and adornCols as the
constants kAdorn (equal to TRUE) and kDontAdorn (equal to FALSE). The
parameters rowInset and colInset specify the space, in pixels, between rows and
columns, respectively. You can set the value of the singleSelection parameter to TRUE
when you want the TGridView object to allow only one cell to be selected at a
time. MacApp calls IGridView from TTextGridView.ITextGridView; you must call
IGridView when you create a new TGridView object by procedure.
æKY TGridView.InsColBefore
æD PROCEDURE TGridView.InsColBefore(aCol: INTEGER; numOfCols: INTEGER;
aWidth: INTEGER);
æFi UGridView.p
æT METHOD
æC InsColBefore inserts the specified number of columns into the TGridView object
before the specified column. The aCol parameter specifies the column before
which the new columns are to be inserted. The numOfCols parameter is the number of
new columns to be inserted. The aWidth parameter is the width, in pixels, of
all the new columns. MacApp calls InsColBefore from various methods that must
adjust the number of columns in a grid. You can use InsColBefore for the same
purpose.
æKY TGridView.InsColFirst
æD PROCEDURE TGridView.InsColFirst(numOfCols: INTEGER; aWidth: INTEGER);
æFi UGridView.p
æT METHOD
æC InsColFirst inserts a specified number of columns into the TGridView object. The
first column in the group to be inserted becomes the first column in the grid.
The numOfCols parameter is the number of columns to be inserted into the grid.
The aWidth parameter is the width in pixels of each of the new columns. MacApp
uses InsColFirst to create the columns in a new TGridView object. You can use
it to add columns to the left side of a grid.
æKY TGridView.InsColLast
æD PROCEDURE TGridView.InsColLast(numOfCols: INTEGER; aWidth: INTEGER);
æFi UGridView.p
æT METHOD
æC InsColLast appends new columns to the right of the existing columns in the
TGridView object. The numOfCols parameter is the number of new columns to be
appended. The aWidth parameter is the width, in pixels, of each of the new columns.
MacApp never calls InsColLast; it is provided for your convenience. You can use
InsColLast to add columns to the right side of a TGridView object.
æKY TGridView.InsRowBefore
æD PROCEDURE TGridView.InsRowBefore(aRow: INTEGER; numOfRows: INTEGER;
aHeight: INTEGER);
æFi UGridView.p
æT METHOD
æC InsRowBefore inserts new rows above the specified row in the TGridView object .
The aRow parameter specifies the row above which the new rows are to be
inserted. TGridView rows are numbered from 1 to the value of the fNumOfRows field,
beginning with the top row. The numOfRows parameter is the number of new rows to
be inserted. The aHeight parameter is the height, in pixels, of each of the new
rows. MacApp calls InsRowBefore from various methods that must adjust the
number of rows in a grid. You can use InsRowBefore for the same purpose.
æKY TGridView.InsRowFirst
æD PROCEDURE TGridView.InsRowFirst(numOfRows: INTEGER; aHeight: INTEGER);
æFi UGridView.p
æT METHOD
æC InsRowFirst inserts the specified number of rows into the TGridView object. The
topmost of the new rows becomes the top row in the grid. The numOfRows
parameter is the number of rows to be inserted in the grid. The aHeight parameter is
the height, in pixels, of each of the new rows. MacApp uses InsRowFirst to create
the rows in a new TGridView object. You can use this method to insert new rows
at the top of a TGridView object.
æKY TGridView.InsRowLast
æD PROCEDURE TGridView.InsRowLast(numOfRows: INTEGER; aHeight: INTEGER);
æFi UGridView.p
æT METHOD
æC InsRowLast appends new rows below the bottom row in the TGridView object. The
numOfRows parameter is the number of new rows to be appended. The aHeight
parameter is the height, in pixels, of each of the new rows. MacApp never calls
InsRowLast; it is provided for your convenience. You can use InsRowLast to add rows
to the bottom of a TGridView object.
æKY TGridView.InvalidateCell
æD PROCEDURE TGridView.InvalidateCell(aCell: GridCell);
æFi UGridView.p
æT METHOD
æC InvalidateCell marks a cell in the TGridView object so that MacApp will redraw
it. The aCell parameter is the ID of the cell to be marked. MacApp calls
InvalidateCell from TTextListView.InvalidateItem; you can use InvalidateCell to mark
any cell that needs to be redrawn.
æKY TGridView.InvalidateSelection
æD PROCEDURE TGridView.InvalidateSelection;
æFi UGridView.p
æT METHOD
æC InvalidateSelection marks the region defining the selected cells in the
TGridView object so that MacApp will redraw the selection. You can use
InvalidateSelection to ensure that the selected area of a TGridView object is redrawn.
æKY TGridView.IRes
æD PROCEDURE TGridView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC IRes initializes a TGridView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TGridView object.
The itsSuperView parameter specifies the TView object into which the view is to be
installed; for a TGridView object, this is usually a TScroller or TWindow
object. The itsParams parameter is a pointer to the portion of the 'view' resource
data used to initialize this view. When the IRes method finishes initializing
the view, the method moves the pointer to the end of this data. MacApp calls
this method for each of the views created from a 'view' resource template, usually
in response to a NewTemplateWindow or a DoCreateViews call. You never need to
call IRes yourself.
æKY TGridView.IsCellSelected
æD FUNCTION TGridView.IsCellSelected(aCell: GridCell): BOOLEAN;
æFi UGridView.p
æT METHOD
æC IsCellSelected returns the value TRUE if the specified cell is selected. The
aCell parameter specifies the TGridView cell to be tested. MacApp calls
IsCellSelected from TTextListView.IsItemSelected to determine if an element in a
TTextListView list is selected. You can use this method to determine whether a
specified cell in a TGridView object is selected.
æKY TGridView.LastSelectedCell
æD FUNCTION TGridView.LastSelectedCell: GridCell;
æFi UGridView.p
æT METHOD
æC LastSelectedCell returns the bottom-right cell in the selected range in the
TGridView object. This method checks cells from right to left in the bottom row of
the selection and then checks the row above the one just checked; therefore, it
is possible for this method to return a cell that is located further to the
left than any others in the selection if that cell is the bottom-most one in the
selection. MacApp calls LastSelectedCell from TTextListView.LastSelectedItem to
obtain a reference to the last selected item of a range in a TTextListView
list. You can use LastSelectedCell to refer to the last first in a selected range
of cells in a TGridView object.
æKY TGridView.RowToVRect
æD PROCEDURE TGridView.RowToVRect(aRow: INTEGER; numOfRows: INTEGER;
VAR aRect: VRect);
æFi UGridView.p
æT METHOD
æC RowToVRect calculates the rectangle that bounds the specified row or rows. The
aRow parameter is the number of the row whose rectangle is to be calculated.
Rows are numbered from top to bottom, starting with 1. The numOfRows parameter is
the number of rows to include in the rectangle calculations. The aRect
parameter contains the calculated rectangle when the method returns. MacApp calls this
method from a variety of methods that must determine the rectangle bounding one
or more rows of cells. You can use RowToVRect in a similar fashion.
æKY TGridView.ScrollSelectionIntoView
æD PROCEDURE TGridView.ScrollSelectionIntoView(redraw: BOOLEAN);
æFi UGridView.p
æT METHOD
æC ScrollSelectionIntoView scrolls the contents of the TGridView object until the
current selection or insertion point is visible. If the selected area is too
large to fit in the visible area of the window, then ScrollSelectionIntoView
ensures that the upper-left part of the selection is visible. Set the value of the
redraw parameter to TRUE if you want the view to be redrawn. When you know the
view will be redrawn eventually and wish to avoid drawing it twice—which makes
the screen appear to flash—you can set the value of the redraw parameter to
FALSE. MacApp calls ScrollSelectionIntoView to ensure that the new selection will
be visible when the current selection changes. You usually do not need to call
this method yourself, but you can use it if you need to ensure that the
selection or the insertion point is visible.
æKY TGridView.SelectCell
æD PROCEDURE TGridView.SelectCell(theCell: GridCell; extendSelection, highlight,
select: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SelectCell manipulates the current selection with respect to the specified cell.
The parameter theCell is the new cell affected by this method. If the value of
the extendSelection parameter is kExtend, then MacApp includes in the
selection the cells that were previously selected as well as the new cell; if the
value of the extendSelection parameter is kDontExtend, then the cell specified by
the parameter theCell becomes the only selected cell. If the value of the
highlight parameter is kHighlight, then MacApp highlights the new selection. If the
value of the select parameter is kSelect, then the specified cell becomes the new
selection; if this parameter is set to kDeSelect, then all cells are
unselected, regardless of the values of the other parameters. MacApp calls this method
from methods such as TGridView.DoMouseCommand. You can call SelectCell to select
specific cells in response to the user’s actions.
æKY TGridView.SetColWidth
æD PROCEDURE TGridView.SetColWidth(aCol: INTEGER; numOfCols: INTEGER; aWidth: INTEGER);
æFi UGridView.p
æT METHOD
æC SetColWidth sets the width of the specified columns. The aCol parameter is the
leftmost column to be affected by the change. Columns are numbered from 1 to the
value of the fNumOfCols field, beginning with the leftmost column. The
numOfCols parameter is the number of columns to be affected by the change. The aWidth
parameter is new width in pixels. MacApp sets all of the specified columns to
the same new width. MacApp calls SetColWidth from several methods that
manipulate columns in TGridview objects—for instance, the methods TTextGridView.IRes
and TTextGridView.ITextGridView use TGridView.SetColWidthto set the initial width
of a new TTextGridView list. You can use this method in a similar fashion.
æKY TGridView.SetEmptySelection
æD PROCEDURE TGridView.SetEmptySelection(highlight: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SetEmptySelection empties the selection. When it returns, no cells in the
TGridView object are selected. If the value of the highlight parameter is kHighlight
(that is, TRUE), then MacApp removes highlighting from the old selection.
MacApp never calls SetEmptySelection; it is provided for your convenience. You can
use it to make the current selection in a TGridView object empty.
æKY TGridView.SetRowHeight
æD PROCEDURE TGridView.SetRowHeight(aRow: INTEGER; numOfRows: INTEGER;
aHeight: INTEGER);
æFi UGridView.p
æT METHOD
æC SetRowHeight sets the height of the specified rows to the given value. The aRow
parameter is the topmost row to be affected by the change. MacApp numbers rows
in a TGridView object from 1 to the value of the fNumOfRows field, beginning
with the top row. The numOfRows parameter is the number of rows to be affected by
the change. The aHeight parameter is the new height, in pixels, of the
affected rows. MacApp calls SetRowHeight from two methods that set the height of one
or more rows in a grid, TTextGridView.IRes and TTextListView.SetItemHeight. You
can use this method in a similar fashion.
æKY TGridView.SetSelection
æD PROCEDURE TGridView.SetSelection(cellsToSelect: RgnHandle;
extendSelection, highlight, select: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SetSelection sets the current selection in a TGridView object to the cells in
the specified region. The cellsToSelect parameter is a handle to the region
containing the cells to be selected. If the value of the extendSelection parameter
is kExtend, then the cells specified by the parameter cellsToSelect are added to
the current selection. If the value of the highlight parameter is kHighlight,
then MacApp highlights the selection. The select parameter controls whether the
cells specified by cellsToSelect are selected or deselected: If its value is
kSelect, the cells are selected; if the value of the select parameter is
kDeSelect, then the cells specified by cellsToSelect are deselected. MacApp calls
SetSelection from TGridView and TCellSelectCommand methods that manipulate
selections in TGridView objects. You can use this method to define a selection in a
TGridView object.
æKY TGridView.SetSelectionRect
æD PROCEDURE TGridView.SetSelectionRect(left, top, right, bottom: INTEGER;
extendSelection, highlight, select: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SetSelectionRect sets the current selection to the specified rectangle. The
parameters left, top, right, and bottom specify the column and row coordinates that
their names suggest. If the value of the extendSelection parameter is kExtend
(that is, TRUE), then the cells specified by left, top, right, and bottom are
added to the current selection. If the value of the highlight parameter is
kHighlight (once again, TRUE), then MacApp highlights the selection. The select
parameter controls whether the cells specified by the left, top, right, and bottom
parameters are selected or deselected: If its value is kSelect (also TRUE), the
cells are selected; if the value of the select parameter is kDeSelect, then
the cells are deselected. MacApp calls SetSelectionRect from TGridView and
TCellSelectCommand methods that manipulate selections in TGridView objects. You can
use this method to define a selection in a TGridView object.
æKY TGridView.SetSingleSelection
æD PROCEDURE TGridView.SetSingleSelection(theSetting: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SetSingleSelection sets the fSingleSelection field so that the selection methods
of TGridView allow only one item or cell to be selected at a time. If the
value of theSetting is TRUE, then only single items or cells may be selected.
MacApp never calls SetSingleSelection; it is provided for your convenience. You can
use it to specify that only single-item selections can be made in a TGridView
object.
æKY TGridView.VPointToCell
æD FUNCTION TGridView.VPointToCell(aPoint: VPoint): GridCell;
æFi UGridView.p
æT METHOD
æC VPointToCell determines which cell contains a specified point. If the point
doesn't lie within any cell, this method returns the null cell coordinates (0,0).
The aPoint parameter specifies the point to be tested. MacApp calls VPointToCell
from methods such as TGridView.IdentifyPoint and
TCellSelectCommand.TrackMouse, that map the location of a mouse click to a cell in a
TGridView object. You
can use this method in a similar fashion.
æKY TGridView.VPointToLastCell
æD FUNCTION TGridView.VPointToLastCell(aPoint: VPoint): GridCell;
æFi UGridView.p
æT METHOD
æC VPointToLastCell returns the view coordinates of the cell in which the given
point lies, or those of the last cell of the row or column if the point's
horizontal or vertical coordinate lies beyond the last cell of the row or column. The
aPoint parameter specifies the point to be tested. MacApp calls VPointToLastCell
from methods such as TGridView.CellsToPixels and TGridView.Draw, that
manipulate selections in TGridView objects. You can use this method to determine the
view coordinates of the cell containing a specified point in a TGridView object,
constraining the point's value to lie within the last row or column in the grid.
æKY TGridView.WRes
æD PROCEDURE TGridView.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC WRes writes the TGridView portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TGridView section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and
the size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TGridView.WriteRes
æD PROCEDURE TGridView.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('grid') and
class name ('TGridView') for the 'view' resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TGridView object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or
signature.
æKY TIcon.Draw
æD PROCEDURE TIcon.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws an icon as a subview of a control and then calls INHERITED
Draw to draw the rest of the control. The area parameter is a QuickDraw rectangle,
described in local coordinates, that defines the part of the control that
needs to be redrawn. You use the area parameter to optimize drawing speed. MacApp
calls this method in response to an update event occurring in the TIcon view.
You usually do not need to call this method yourself.
æKY TIcon.Fields
æD PROCEDURE TIcon.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TIcon object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TIcon object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TIcon.Free
æD PROCEDURE TIcon.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TIcon object and then calls INHERITED Free
to release the memory used by dependent structures. MacApp calls Free in the
normal process of freeing objects. You must call Free if you allocated the icon
and have managed it yourself.
æKY TIcon.IIcon
æD PROCEDURE TIcon.IIcon(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsRsrcID: INTEGER; preferColor: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method initializes a TIcon object and installs it in the given superview.
If the value of preferColor is TRUE, then MacApp tries to obtain the icon from a
'cicn' resource. If the value of preferColor is FALSE, or no 'cicn' is
available, then MacApp tries to obtain the icon from an 'ICON' resource. The
fDefChoice field is set to mIconHit. The itsSuperView parameter is the view in which
the icon (which itself is a view) appears. The itsLocation parameter is the icon's
location, in view coordinates. The itsSize parameter is the icon's size, in
pixels. The itsHSizeDet and itsVSizeDet parameters determine how the view's
horizontal and vertical dimensions are calculated, respectively. Possible values are
sizeSuperView (subview is the same size as superview), sizeRelSuperView
(subview size changes an equal amount relative to the superview's size), sizePage
(view is made the size of one page), sizeFillPages (view grows to fill an exact
number of pages), sizeVariable (view size fluctuates according to
application-specific criteria), or sizeFixed (no special handling of size issues). The
itsRsrcID parameter is the integer that MacApp uses to refer to the view's resource.
Set preferColor to TRUE if you want the icon to created using a 'cicn' resource.
MacApp does not call this method; it is included for your convenience. You can
call this method to procedurally initialize a TIcon object.
æKY TIcon.IRes
æD PROCEDURE TIcon.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TIcon object from a 'view' resource template. The fDefChoice
field is set to mIconHit. The itsDocument parameter specifies the document
associated with the TIcon object. The itsSuperView parameter specifies the view in
which the icon appears. The itsParams parameter is a pointer to the portion of
the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a DoCreateViews
call. You never need to call IRes yourself.
æKY TIcon.ReleaseIcon
æD PROCEDURE TIcon.ReleaseIcon;
æFi UDialog.p
æT METHOD
æC This method releases memory used by the TIcon object. ReleaseIcon is called by
TIcon.Free before it calls INHERITED Free. ReleaseIcon is also called by
TIcon.SetIcon to release the old icon before setting the handle to the new icon data.
You can use ReleaseIcon in a similar fashion.
æKY TIcon.SetIcon
æD PROCEDURE TIcon.SetIcon(theIcon: Handle; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SetIcon accepts a handle to an icon bitmap and stores the handle in the
fDataHandle field. This method will also redraw the icon if desired. The parameter
theIcon is the handle to new icon data. When the value of the redraw parameter is
TRUE, the icon is redrawn. When you set the value of redraw to FALSE, the icon
is not redrawn even though its appearance may be affected by the change. You can
set redraw to FALSE when you know the icon will be redrawn eventually and you
wish to avoid drawing it twice, which makes the screen appear to flicker. You
can call this method when you want an icon object to display a different icon.
æKY TIcon.WRes
æD PROCEDURE TIcon.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TIcon portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the TIcon
section of the view’s resource template. WRes is the inverse of the IRes method,
and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are active on
the screen. You rarely need to call this method yourself. You must override
this method in your subclasses to create your own 'view' resources. Your override
should check the size of the space remaining in the template past the end of
the previously-written resource data; if there is not enough space to write your
data into the file, your override should call the global routine ExpandPtr,
passing as arguments the current values of theResource, itsParams, and the size
of your resource data, in bytes. ExpandPtr expands the 'view' resource handle by
the amount you specify, or by kViewRsrcExpandAmt, whichever is greater. You
need not be concerned about making the 'view' resource handle too big, because
MacApp reclaims unused space by returning a new value for itsParams when the WRes
method completes.
æKY TIcon.WriteRes
æD PROCEDURE TIcon.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('icon') and
class name ('TIcon') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the view’s
resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a TIcon
object as part of a 'view' resource; you can use it in a similar fashion. You can
override this method to provide your own unique class name or signature.
æKY TInspector.AddObject
æD PROCEDURE TInspector.AddObject(theObject: TObject);
æFm UInspector.inc1.p
æT METHOD
æC AddObject adds an object to the TInspector object’s list. The parameter
theObject specifies the object to be added to the Inspector's list of objects. (Do not
add an object of type TObjectList; doing so creates an infinite loop.) MacApp
calls AddObject from the global routine AddObjectToInspector when a new object
is created. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TInspector.AddObjectList
æD FUNCTION TInspector.AddObjectList(classId: ObjClassID): TObjectList;
æFm UInspector.inc1.p
æT METHOD
æC AddObjectList creates and returns a new TObjectList object. The classID
parameter specifies the class whose instances can be members of the new list. MacApp
calls AddObjectList from TInspector.AddObject. This method is internal to the
MacApp Inspector; you cannot call it yourself or override it.
æKY TInspector.DoSetupMenus
æD PROCEDURE TInspector.DoSetupMenus; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DoSetupMenus sets the states of all menu items pertaining to the Inspector when
a TInspector object’s window becomes the active window. The default version of
this method simply calls INHERITED DoSetupMenus, then disables the Save As and
Save A Copy menu items. MacApp calls DoSetupMenus when the Inspector window
becomes active. This method is internal to the MacApp Inspector; you cannot call
it yourself or override it.
æKY TInspector.Fields
æD PROCEDURE TInspector.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each of the TInspector object’s fields to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TInspector object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the Inspector. This
method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TInspector.Free
æD PROCEDURE TInspector.Free; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Free releases the memory used by the TInspector object and its component
objects. MacApp calls Free when the user closes the TInspector object’s window. This
method is internal to the Inspector; you cannot call it yourself or override it.
æKY TInspector.GetObjectList
æD FUNCTION TInspector.GetObjectList(classId: ObjClassID): TObjectList;
æFm UInspector.inc1.p
æT METHOD
æC GetObjectList searches the TInspector object’s fClassesByID field for objects of
the specified type; it then returns a TObjectList object that contains all
those that it finds. The classID parameter specifies the class of objects that
will be returned in the TObjectList object. GetObjectList is called by
TInspector.AddObject when adding a new object to the Inspector's list. It is also
called by TInspector.RemoveObject when deleting an object from that list.
GetObjectList is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TInspector.IInspector
æD PROCEDURE TInspector.IInspector;
æFm UInspector.inc1.p
æT METHOD
æC IInspector initializes the fields of a new TInspector object. IInspector is
called by the global routine MakeInspector when it creates a new Inspector
document. This method is internal to the MacApp Inspector; you cannot call it yourself
or override it.
æKY TInspector.MakeWindow
æD FUNCTION TInspector.MakeWindow: TInspectWindow;
æFm UInspector.inc1.p
æT METHOD
æC MakeWindow creates the Inspector window, displays its contents, and returns the
TInspectWindow object. MacApp calls MakeWindow when it creates a new Inspector
window. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TInspector.RemoveObject
æD PROCEDURE TInspector.RemoveObject(theObject: TObject);
æFm UInspector.inc1.p
æT METHOD
æC RemoveObject removes an object from the MacApp Inspector’s list of active
objects. The parameter theObject is the object to be removed from the Inspector's
list of objects. MacApp calls RemoveObject from TObject.Free when disposing of an
object. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TInspectorCommand.DoIt
æD PROCEDURE TInspectorCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt creates a new Inspector window. MacApp calls this method when the user
creates a new Inspector window. (The user may create Inspector windows either by
choosing the New Inspector Window menu item or clicking on a field in an existing
Inspector window while pressing the Option key.) You never need to call the
DoIt command yourself.
æKY TInspectorCommand.Fields
æD PROCEDURE TInspectorCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TInspectorCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TInspectorCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TInspectorCommand.IInspectorCommand
æD PROCEDURE TInspectorCommand.IInspectorCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IInspectorCommand initializes a TInspectorCommand object and associates it with
a command number. The itsCmdNumber parameter is the command number associated
with a particular menu command—in this case, the New Inspector Window command.
The command number is used in the 'cmnu' resource in the resource description
file; you typically define a constant to represent that number in both the
resource description file and in the appropriate interface or implementation file of
the application. MacApp calls this method when the user creates a new Inspector
window. (The user may create Inspector windows either by choosing the New
Inspector Window menu item or clicking on a field in an existing Inspector window
while pressing the Option key.) You never need to call IInspectorCommand
yourself.
æKY TInspectWindow.CloseByUser
æD PROCEDURE TInspectWindow.CloseByUser; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC CloseByUser is overridden to prevent closing the Inspector document when the
last Inspector window is closed. The default version calls TWindow.Close, which
does not close the document. MacApp calls this method when the user closes the
last remaining Inspector window. This method is internal to the MacApp Inspector;
you cannot call it yourself or override it.
æKY TInspectWindow.Draw
æD PROCEDURE TInspectWindow.Draw(area: Rect); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC This method draws the TInspectWindow object that the Inspector uses to display
its data. Most of the window is drawn by calling INHERITED Draw; this override
adds the horizontal line separating the upper pane of the Inspector window from
the lower portion. The area parameter is the QuickDraw rectangle, specified in
view coordinates, that defines the boundaries of the window. MacApp calls this
method when the user creates a new Inspector window. This method is internal to
the MacApp Inspector; you cannot call it yourself or override it.
æKY TInspectWindow.Fields
æD PROCEDURE TInspectWindow.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TInspectWindow object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TInspectWindow object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TInspectWindow.IInspectWindow
æD PROCEDURE TInspectWindow.IInspectWindow;
æFm UInspector.inc1.p
æT METHOD
æC IInspectWindow initializes a window and several subviews in which to display the
Inspector window and its various scrolling views, then adds the window to the
Inspector’s free window list. The Inspector window is initialized to have a
close box and a resize box. If you disable the compile-time flag qTemplateViews,
TInspector.MakeWindow calls IInspectWindow to initialize the window it creates;
otherwise, it creates one from a 'view' resource and calls IRes to initialize
it. This method is internal to the MacApp Inspector; you cannot call it yourself
or override it.
æKY TInspectWindow.InsertClass
æD PROCEDURE TInspectWindow.InsertClass(itemNo: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC This method increments the size of the Inspector's class list (fClassListView)
by 1 and sets the selection to the specified position. The itemNo parameter
specifies the position in the list that becomes the new selection. InsertClass is
called by TInspector.AddObjectList to insert a class name in the Inspector's
class list view. This method is internal to the MacApp Inspector; you cannot call
it yourself or override it.
æKY TInspectWindow.IRes
æD PROCEDURE TInspectWindow.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC IRes initializes a TInspectWindow object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TInspectWindow
object. The itsSuperView parameter specifies the TView object into which the
view is to be installed. The itsParams parameter is a pointer to the portion of
the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call.
This method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TInspectWindow.Resize
æD PROCEDURE TInspectWindow.Resize(width, height: VCoordinate;
invalidate: BOOLEAN); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC This method is overridden to resize the subviews of an Inspector window after
first calling INHERITED Resize to resize the window itself. The width parameter
is the window’s new horizontal dimension, expressed in local view coordinates.
The height parameter is the window’s new vertical dimension, expressed in local
view coordinates. If you set the value of the invalidate parameter to TRUE, the
window and its subviews will be invalidated, forcing them to be redrawn in the
update process. When you know the window will be redrawn eventually and wish
to avoid drawing it twice—which makes the screen appear to flash—you can set the
invalidate parameter to FALSE. MacApp calls Resize from
TInspectWindow.IInspectWindow to adjust the height of the window being initialized;
it is called again later from IInspectWindow to draw the resized window. This method
is internal to the Inspector; you cannot call it yourself or override it.
æKY TInspectWindow.SelectObject
æD PROCEDURE TInspectWindow.SelectObject(theObject: TObject; theType: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC After making sure the specified object is a valid object, SelectObject installs
it in the window as the selected object. SelectObject also ensures that the
class and object list views are in sync. The parameter theObject is the TInspector
object to be selected. Normally, you will coerce theObject to the correct type
for this list. The parameter theType is an integer specifying the classID of
the object to be installed. SelectObject is called by TObjectView.SelectField to
select objects for display in the MacApp Inspector. This method is internal to
the MacApp Inspector; you cannot call it yourself or override it.
æKY TInspectWindow.SetNumberOfClasses
æD PROCEDURE TInspectWindow.SetNumberOfClasses(noOfClasses: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC SetNumberOfClasses sets the number of classes in fClassListView and redraws the
class list. The noOfClasses parameter is an integer specifying the number of
items in the Inspector's class list. SetNumberOfClasses is called by
TInspector.MakeWindow to set the number of classes shown in the new window. This
method is internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TInspectWindow.SetTitleForDoc
æD PROCEDURE TInspectWindow.SetTitleForDoc(newDocTitle: Str255); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC This method sets the title of an Inspector window. The newDocTitle parameter is
the Inspector window's title. This method is internal to the MacApp Inspector;
you cannot call it yourself or override it.
æKY TList.At
æD FUNCTION TList.At(index: ArrayIndex): TObject;
æFi UList.p
æT METHOD
æC The At method returns the item that occupies a specified position in a TList
list; the caller typically coerces the result into a descendant of TObject. If you
set the compile flag qRangeCheck to TRUE, At ensures that the value of index
is between 1 and the value of the fSize field. The index parameter is an Integer
specifying a position in the list; the first item in the list is number 1.
MacApp calls At to retrieve objects stored in TList lists. You can call At to
retrieve an object from a specific position in a TList list. You can also use this
method if you want to treat a list as an array.
æKY TList.AtDelete
æD PROCEDURE TList.AtDelete(index: ArrayIndex);
æFi UList.p
æT METHOD
æC AtDelete deletes an item in a list as specified by the index parameter. The
index parameter is an Integer specifying a position in the list; the first item in
the list is number 1. MacApp calls this method from TList.Delete and TList.Pop
to remove an item from a list, using an index to specify the item to be
removed. You can use this method in a similar fashion.
æKY TList.AtPut
æD PROCEDURE TList.AtPut(index: ArrayIndex; newItem: TObject);
æFi UList.p
æT METHOD
æC TList.AtPut replaces an item in the specified position in a list without freeing
the old item. If you set the compile flag qRangeCheck to TRUE, AtPut ensures
the validity of the value of the index parameter. If you set the qDebug flag to
TRUE, this method verifies that newItem is a member of the same class as the
other objects in the list, and that the list contains members of TObject or one
of its subclasses. The index parameter is an integer specifying the position in
the list occupied by the item to be replaced. The newItem parameter is the
object that will replace the item in the position specified by the index parameter.
WARNING: If you call AtPut from within an Each method, the results will be
unpredictable. AtPut is called by TList.SortBy to order the elements in a list.
You can use this method to replace an item in a TList list without freeing the
old item.
æKY TList.Delete
æD PROCEDURE TList.Delete(item: TObject);
æFi UList.p
æT METHOD
æC This method deletes the first reference to the specified item from the list and
reduces the number of items in the list (fSize) by 1, but does not free the
item. If the item is not present in the list, this method does nothing. The item
parameter is an object that is a member of TObject or one of its subclasses.
Delete is called by MacApp to remove items from TList lists. You can use this
method in a similar fashion.
æKY TList.DeleteAll
æD PROCEDURE TList.DeleteAll;
æFi UList.p
æT METHOD
æC DeleteAll deletes every element from a TList list and sets fSize to 0, but does
not free any objects. DeleteAll is called by TList.FreeAll; you can call
DeleteAll to delete all items from a TList list.
æKY TList.DynamicFields
æD PROCEDURE TList.DynamicFields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: integer)); OVERRIDE;
æFi UList.p
æT METHOD
æC DynamicFields reports the contents of each of the TList object’s elements to the
MacApp Inspector. DoToField is a procedure that MacApp passes to DynamicFields
to report the contents of each dynamic field. DynamicFields iterates over all
the TList object’s elements, performing DoToField on each one. In this way
DynamicFields reports the contents of each dynamic field to the Inspector. MacApp
calls DynamicFields from the MacApp Inspector. You must override this method in
your subclasses if you want the Inspector to display your dynamic fields in a
different format than the default. Your override must not call INHERITED Fields;
the override must be responsible for displaying all dynamic fields.
æKY TList.Each
æD PROCEDURE TList.Each(PROCEDURE DoToItem(item: TObject));
æFi UList.p
æT METHOD
æC Each calls DoToItem once for each element of the list, in order. If DoToItem
calls InsertLast, the newly added element will NOT be enumerated. The DoToItem
parameter is a procedure whose argument is a descendant of TObject. Because MacApp
stores objects in TList lists, performing the same action on many objects is
often as simple as calling Each with the procedure it needs to perform as the
argument. You can use Each in this fashion.
æKY TList.Fields
æD PROCEDURE TList.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UList.p
æT METHOD
æC Fields reports the contents of each field of the TList object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TList object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TList.First
æD FUNCTION TList.First: TObject;
æFi UList.p
æT METHOD
æC First returns the first item in a TList list; typically, the caller then coerces
the result into a descendant of TObject. MacApp calls First, for example, in
TView.MakeFirstSubview to return the first subview in the list of subviews, so
that the method can insert a subview in the first position in the list. You can
use First to obtain the first item in a list of objects.
æKY TList.FirstThat
æD FUNCTION TList.FirstThat(FUNCTION TestItem(item: TObject): BOOLEAN): TObject;
æFi UList.p
æT METHOD
æC FirstThat returns from a list the first item that meets specified criteria. If
no item in the list satisfies the criteria, FirstThat returns NIL. It is typical
for the caller to coerce the result into a descendant of TObject. If TestItem
calls InsertLast, the newly added element will NOT be enumerated. FirstThat
takes as its parameter the function TestItem, which looks for an item specified by
its argument, item. The item parameter is typically a descendant of TObject.
FirstThat is used internally by the methods TAssociation.FirstEntryThat,
TView.FirstSubViewThat, and TInspectWindow.SelectObject. You can use it to obtain from
a list the first object of a particular type that meets specified criteria.
æKY TList.FreeAll
æD PROCEDURE TList.FreeAll;
æFi UList.p
æT METHOD
æC FreeAll deletes each element in a TList list object, sets fSize to 0, and frees
each list element. FreeAll deletes all of the elements in the list by calling
Each with the argument FreeIfObject, but does not free the TList object.
æKY TList.FreeList
æD PROCEDURE TList.FreeList;
æFi UList.p
æT METHOD
æC FreeList frees each object in the list, then frees the list. To accomplish this,
it simply calls Each with the procedure FreeIfObject as a parameter, then
calls Free to free the list object itself. Because MacApp stores objects as TList
lists, FreeList is often called when freeing objects. The following methods call
FreeList: TAssociation.Free, TDocument.Free, TInspector.Free, and TView.Free.
You can use FreeList in a similar fashion.
æKY TList.GetEqualItemNo
æD FUNCTION TList.GetEqualItemNo(item: TObject): ArrayIndex;
æFi UList.p
æT METHOD
æC GetEqualItemNo returns the index of the specified item, or 0 if the item is not
in the list. The default behavior of this method is the same as that of the
GetSameItemNo method; you can override GetEqualItemNo to implement behavior unique
to your own list. The item parameter is an object of class TObject or one of
its subclasses. MacApp calls this method when manipulating lists of objects. You
can call this method to find out if an object is in the list, and, if so,
obtain its index.
æKY TList.GetInspectorName
æD PROCEDURE TList.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UList.p
æT METHOD
æC GetInspectorName customizes the name of a TList object displayed in the
Inspector window; it creates a string consisting of the string “Of ”, the class name
set by the method SetEltType, the string “Size: ”, and the number of dynamic
array elements this object occupies in memory. The inspectorName parameter contains
the TList object’s name when the method returns. MacApp calls this method when
displaying items in Inspector windows. You usually do not need to call this
method yourself.
æKY TList.GetSameItemNo
æD FUNCTION TList.GetSameItemNo(item: TObject): ArrayIndex;
æFi UList.p
æT METHOD
æC GetSameItemNo returns the index of the specified item, or zero if the item is
not in the list. The item parameter is an object of class TObject or one of its
subclasses. You can call this method to find out if an object is in the list,
and, if so, obtain its index.
æKY TList.IList
æD PROCEDURE TList.IList;
æFi UList.p
æT METHOD
æC IList initializes a new list with no elements; that is, it sets fSize to 0.
IList is called by several methods as part of their initialization procedures,
including TAssociation.IAssociation, TInspector.IInspector,
TObjectList.IObjectList, and the global routine NewList. You can call it to set
initial values for the fields of a TList object; you must always call it once before
calling any other method, but you must never call it twice.
æKY TList.Insert
æD PROCEDURE TList.Insert(item: TObject);
æFi UList.p
æT METHOD
æC Insert adds the specified item in the list in the order of arrival; that is,
Insert appends the item to the end of the list. The item parameter specifies the
item to be inserted. MacApp calls this method when manipulating the command
queue, and when managing lists of objects for the Inspector. You can use this
method to place an object at the end of a TList list. You can override this method
to insert the item in any desired location.
æKY TList.InsertBefore
æD PROCEDURE TList.InsertBefore(index: ArrayIndex; item: TObject);
æFi UList.p
æT METHOD
æC InsertBefore inserts a reference to a specified item at a specified position and
increments the value of fSize by 1. InsertBefore signals failure if it is
unable to increase the size of the list. If the value of the qDebug flag is TRUE
and TList.SetEltType was used to set the type of objects permitted in the list,
InsertBefore makes sure it has not been called from within an Each method,
checks the validity of the value of the index parameter, and verifies that the new
item's type matches that of the other objects in the list. The index parameter
is the new element’s position in the list. If the value of index is 1,
InsertBefore places the new element at the beginning of the list. If the value of
index is equal to fSize + 1, InsertBefore places the new element at the end of the
list. The item parameter is the new object inserted in the list. InsertBefore is
used internally by TSortedList.Insert, TList.InsertFirst, and TList.InsertLast.
You can use it to insert a reference to any position in a TList list.
æKY TList.InsertFirst
æD PROCEDURE TList.InsertFirst(item: TObject);
æFi UList.p
æT METHOD
æC InsertFirst inserts a reference to the specified item at the beginnning of the
list and increases the value of fSize by 1. InsertFirst signals failure if it is
unable to increase the size of the list. If the value of the qDebug flag is
TRUE and TList.SetEltType was used to set the type of objects permitted in the
list, InsertFirst verifies that the new item's type matches that of the other
objects in the list. The item parameter is the new object inserted in the list; it
is a member of TObject or one of its subclasses. The index of the new element
is 1. InsertFirst is called by TView.MakeFirstSubView to force a subview to be
the first in the list of subviews. You can use this method to refer to the
first item in a TList list.
æKY TList.InsertLast
æD PROCEDURE TList.InsertLast(item: TObject);
æFi UList.p
æT METHOD
æC InsertLast inserts a reference to the specified item at the end of the list and
increases the value of fSize by 1. InsertLast signals failure if it is unable
to increase the size of the list. If the value of the qDebug flag is TRUE and
TList.SetEltType was used to set the type of objects permitted in the list,
InsertLast verifies that the new item's type matches that of the other objects in
the list. The item parameter is the new object inserted in the list; it is a
member of TObject or one of its subclasses. MacApp callst this method to manipulate
lists of objects, lists of documents and lists of views; methods that call
InsertLast include TApplication.AddDocument, TApplication.AddFreeWindow,
TList.InsertLast, TView.AddSubview, TDocument.AddView, TDocument.AddWindow,
TSScrollBar.AttachScroller, and TView.MakeLastSubView. You can use this method in a
similar fashion.
æKY TList.IterateTil
æD FUNCTION TList.IterateTil(FUNCTION TestItem(item: TObject): Boolean;
IterateForward: Boolean; VAR itsIndex: ArrayIndex): TObject;
æFi UList.p
æT METHOD
æC IterateTil is the basic list iterator. It calls TestItem once for each element
of the list, in order, until TestItem returns TRUE. IterateTil then returns the
element that satisfied the test; usually the caller coerces the result into a
subclass of TObject. If no element in the list satisfies the test, both TestItem
and IterateTil return NIL. TestItem is a procedure you define whose argument
is typically a descendant of TObject. If TestItem calls InsertLast, the newly
added element will NOT be enumerated. If TestItem calls AtPut, InsertBefore,
InsertFirst, or DeleteAll, misbehavior will ensue.
æKY TList.Last
æD FUNCTION TList.Last: TObject;
æFi UList.p
æT METHOD
æC Last returns the last item in a TList list; typically, the caller then coerces
the result into a subclass of TObject. If the compile flags qRangeCheck and
qDebug are set to TRUE, Last performs a range check on the index. Last is called by
TView.MakeLastSubview to place a subview in the last position in the list.
æKY TList.LastThat
æD FUNCTION TList.LastThat(FUNCTION TestItem(item: TObject): BOOLEAN): TObject;
æFi UList.p
æT METHOD
æC LastThat returns from a list the last item that meets specified criteria. If no
item in the list satisfies the criteria, LastThat returns NIL. It is typical
for the caller to coerce the result into a subclass of TObject. If TestItem calls
InsertLast, the newly added element will NOT be enumerated. LastThat takes as
its parameter the function TestItem, which looks for an item specified by its
argument, item. The item parameter is typically a descendant of TObject.
LastThat is used internally by TView.LastSubViewThat and TDocument.ShowWindows. You
can use LastThat to obtain the last item in a list that meets your specified
criteria—for example, the last item of a particular class.
æKY TList.Pop
æD FUNCTION TList.Pop: TObject;
æFi UList.p
æT METHOD
æC The Pop method pops an item from the list, in last-in, first-out order.
æKY TList.Push
æD PROCEDURE TList.Push(item: TObject);
æFi UList.p
æT METHOD
æC The Push method pushes an item onto the list so that it can be retrieved in
last-in, first-out order. This method is equivalent to the InsertLast method.
æKY TList.SetEltType
æD PROCEDURE TList.SetEltType(toClass: MAName);
æFi UList.p
æT METHOD
æC SetEltType sets a string that identifies the name of the class of objects
inserted in a TList list; take care not to confuse this method with
TList.SetEltTypeID, which lets you specify the class to which new list elements are
coerced. The
classID, which actually determines the type to which list elements are
coerced, is set not by SetEltType, but by SetEltTypeID. The toClass parameter is the
class name of all objects in the list. The Inspector uses SetEltType internally;
it is also used at initialization time. You can call SetEltType when you want
to set the class name of objects to be inserted in a TList list. After creating
and initializing the list, you must call SetEltType in debug mode only once,
unless you pass the same argument in both calls.
æKY TList.SetEltTypeID
æD PROCEDURE TList.SetEltTypeID(toClassID: ObjClassID);
æFi UList.p
æT METHOD
æC SetEltTypeID sets the type of objects to be inserted in the TList list. The
toClassID parameter is the class ID of all objects in the list. SetEltTypeID is
used internally by TObjectList.IObjectList. You can use this method to set the
classID to which objects inserted in a TList list will be coerced. After creating
and initializing the list, you must call SetEltTypeID in debug mode only once,
unless you pass the same argument in both calls. In debug mode, the TList
insert methods coerce new list elements to the class specified by the toClassID
parameter, thus ensuring that the list contains only elements of the specified
type.
æKY TList.SortBy
æD PROCEDURE TList.SortBy(FUNCTION CompareItems(item1, item2: TObject): CompareResult);
æFi UList.p
æT METHOD
æC The SortBy method sorts a list by using a CompareItems function that you supply.
Your CompareItems function must accept as its argument two TList objects and
return a result that ranks them according to your specified criteria. The
parameters item1 and item2 are the objects that CompareItems evaluates. CompareItems
should return one of the constants kItem1LessThanItem2, kItem1EqualItem2, or
kItem1GreaterThanItem2, according to whether the ObjClassID of item1 is less
than, equal to, or greater than the ObjClassID of item2. MacApp predefines these
constants for your convenience; however, you are not forced to use them. MacApp
calls this method from TSortedList.Sort when ordering the items in a TSortedList
list. You can use this method in a similar fashion.
æKY TListView.CalcMinSize
æD PROCEDURE TListView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC CalcMinSize calculates the minimum dimensions of the TListView object. The
minSize parameter contains the calculated size, represented as a view point, when
the method returns. MacApp calls CalcMinSize to ensure that the view will not
become smaller than a certain minimum size when it resizes the TListView object.
This method is internal to the MacApp Inspector; you cannot call it yourself.
æKY TListView.ChangeSelection
æD PROCEDURE TListView.ChangeSelection(index: INTEGER; highlight: BOOLEAN);
æFm UInspector.inc1.p
æT METHOD
æC ChangeSelection sets the current selection in a TListView object and then calls
TListView.SelectItem. SelectItem is an empty method; you can override it to do
something to the new selection. The index parameter specifies the position in
the list occupied by the object to be selected. Items are numbered from the
beginning of the list, starting with 1. If the value of the highlight parameter is
TRUE and the view is focused, ChangeSelection removes highlighting from the old
selection and highlights the new selection. ChangeSelection is called by
TObjListView.InstallObjectList, TClassListView.SelectItem,
TInspectWindow.SelectObject, and TListView.DoMouseCommand. This method is internal to
the MacApp Inspector; you cannot call it yourself or override it.
æKY TListView.DeleteItem
æD PROCEDURE TListView.DeleteItem(itemNo: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC DeleteItem removes the specified item from the TListView object’s list of items
and then forces the view to be redrawn. The itemNo parameter is the index of
the item to be deleted. Items in a TListView object are numbered from the
beginning of the list, starting with 1. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TListView.DoHighlightSelection
æD PROCEDURE TListView.DoHighlightSelection(fromHL, toHL: HLState); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DoHighlightSelection sets the highlight state of the TListView object’s
selection. The parameter fromHL is the selection’s original highlight state; the toHL
parameter is the desired highlight state. Possible highlight states are hlOff
(selection is not highlighted), hlDim (selection is dimmed), and hlOn (selection
is highlighted). MacApp calls DoHighlightSelection when drawing the contents of
the view and when the view is activated or deactivated. This method is
internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TListView.DoMouseCommand
æD FUNCTION TListView.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DoMouseCommand performs the appropriate actions to process a mouse click in a
TListView object. This method maps the coordinates of the mouse click to an item
in the list, selects that item, and returns NIL. The parameter theMouse is the
mouse pointer’s current location, described in view coordinates. The info
parameter is the event record of the mouse-down event that caused DoMouseCommand to
be called. The hysteresis parameter is a point that represents the horizontal
and vertical distance the mouse can travel between clicks and still be
considered to be at the same location. MacApp uses this parameter to determine whether
a double click has occurred or if a control has moved. DoMouseCommand is called
when MacApp receives a mouse-down event in a TListView object. This method is
internal to the Inspector; you cannot call it yourself or override it.
æKY TListView.Draw
æD PROCEDURE TListView.Draw(area: Rect); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC This method draws the image of the TListView object on the screen. The area
parameter is a QuickDraw rectangle, described in local coordinates, that defines
part of the control that needs to be redrawn. You use this parameter to optimize
drawing speed. MacApp calls Draw when the image of the TListView object must be
updated. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TListView.DrawItem
æD PROCEDURE TListView.DrawItem(itemNumber: INTEGER; basePoint: Point);
æFm UInspector.inc1.p
æT METHOD
æC DrawItem is an empty method; when overridden, it must draw a single item that
appears in a specified position in a TListView list. The itemNumber parameter
specifies the position in the list occupied by the item to be drawn. The basePoint
parameter is the top-left point of the item’s defining rectangle, expressed in
global coordinates. DrawItem is called by TListView.Draw to draw single items
in a TListView list. This method is internal to the Inspector; you cannot call
it yourself or override it.
æKY TListView.Fields
æD PROCEDURE TListView.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TListView object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TListView
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
This method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TListView.IListView
æD PROCEDURE TListView.IListView(itsDocument: TDocument; itsSuperView: TView;
itsLocation: VPoint; itsSize: VPoint; itsTextStyle: TextStyle;
itsNumberOfItems: INTEGER; itsHSizeDet: SizeDeterminer);
æFm UInspector.inc1.p
æT METHOD
æC This method initializes the fields of a TListView object. The itsDocument
parameter is the document associated with the list. The itsSuperView parameter is the
view in which the list appears; usually this view is a TWindow or TScroller
object. The itsLocation parameter is the location of the upper-left corner of the
TListView object in the local coordinates of the superview. The itsSize
parameter is the size of the list in pixels, represented as a view point. The
itsTextStyle parameter specifies the style of the font displayed in the view; MacApp
predefines certain constants that specify these styles in the file UMacApp.p.
The itsNumberOfItems parameter is the number of items that initially appear in
the list view. The view's horizontal and vertical dimensions are specified
separately by the itsHSizeDet and the itsVSizeDet parameters, respectively. Possible
values are sizeSuperView (subview is the same size as superview),
sizeRelSuperView (subview size changes an equal amount relative to the superview's
size), sizePage (view is to be the size of one page), sizeFillPages (view grows to
fill an exact number of pages), sizeVariable (view size fluctuates according to
application-specific criteria), or sizeFixed (no special handling of size issues).
IListView is called by TClassListView.IClassListView, TObjectView.IObjectView,
and TObjListView.IObjListView to perform initialization tasks common to objects
in these classes. This method is internal to the MacApp Inspector; you cannot
call it yourself or override it.
æKY TListView.InsertItem
æD PROCEDURE TListView.InsertItem(itemNo: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC InsertItem inserts a blank item at the specified position in a TListView list,
adjusts the values of fCurrentSelection and fNumberOfItems accordingly, resizes
the list, and then redraws the portion of the list from the inserted item to
the list’s end. The itemNo parameter is the position in the list that the newly
inserted item is to occupy. InsertItem is called by TInspector.AddObject and
TInspectWindow.InsertClass when these methods add a new item to a list of objects
displayed in an Inspector window. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TListView.IRes
æD PROCEDURE TListView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC IRes initializes a TListView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TListView object. The
itsSuperView parameter specifies the TView object into which the view is to be
installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data. MacApp
calls this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. This
method is internal to the MacApp Inspector; you cannot call it yourself.
æKY TListView.ItemToVRect
æD PROCEDURE TListView.ItemToVRect(index: INTEGER; VAR itemRect: VRect);
æFi UInspector.inc1.p
æT METHOD
æC ItemToVRect maps a list item to a rectangle described in view coordinates. The
index parameter is the position in the list that the specified item occupies.
The itemRect parameter is the rectangle that defines the list item's text on the
screen. MacApp calls ItemToVRect to define a selection for various operations
it performs on TListView objects. Methods that call ItemToVRect are the
following, all defined in the TListView class: DeleteItem, DoHighlightSelection,
InsertItem, and RevealItem. This method is internal to the MacApp Inspector; you
cannot call it yourself or override it.
æKY TListView.RevealItem
æD PROCEDURE TListView.RevealItem(itemNumber: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC RevealItem makes a specific item in the list visible. The itemNumber parameter
is the number of the element in the list that is to be revealed. RevealItem is
called by TInspectWindow.SelectObject to ensure that a new selection in an
Inspector window's class list is visible. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TListView.SelectItem
æD PROCEDURE TListView.SelectItem(itemNumber: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC SelectItem is an empty method; when overridden, it can do something when the
user selects an item. The itemNumber parameter is the selected item’s position in
the TListView list. Items in a TListView list are numbered consecutively from
the beginning of the list, starting with 1. TListView.ChangeSelection calls
SelectItem as the last action it takes. TListView.SelectItem is also called as an
inherited method by TClassListView.SelectItem and TObjListView.SelectItem. This
method is internal to the Inspector; you cannot call it yourself or override it.
æKY TListView.SetNumberOfItems
æD PROCEDURE TListView.SetNumberOfItems(numberOfItems: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC SetNumberOfItems sets fNumberOfItems equal to the value specified in
numberOfItems, adjusts the size of the TListView view, and forces the view to be
redrawn.
The numberOfItems parameter is the number of elements to be contained in the
TListView list. SetNumberOfItems is called by the methods that perform operations
on TListView lists; these methods include TObjectView.InstallObject,
TObjListView.InstallObjectList, and TInspectWindow.SetNumberOfClasses.
SetNumberOfItems is internal to the MacApp Inspector; you cannot call it yourself
or override it.
æKY TListView.SetPen
æD PROCEDURE TListView.SetPen;
æFm UInspector.inc1.p
æT METHOD
æC SetPen resets the initial state of the pen and the text style in the current
grafPort as follows: The value of the pnSize field is set to (1,1), the value of
the pnMode field is set to patCopy, and the value of the pnPat field is set to
black. The pen's location is not changed. The text style is set to the
characteristics specified in the object's fTextStyle field. SetPen is called by
TListView.Draw, TListView.SetStyle, and TObjectView.Draw as a precursor to drawing in
TListView views. This method is internal to the MacApp Inspector; you cannot
call it yourself or override it.
æKY TListView.SetStyle
æD PROCEDURE TListView.SetStyle(itsTextStyle: TextStyle);
æFi UInspector.inc1.p
æT METHOD
æC SetStyle sets the fItemHeight and fLineAscent fields according to information
about the text style specified in itsTextStyle; it then adjusts the size of the
TListView view to accommodate the settings. The itsTextStyle parameter specifies
the style of the font displayed in the view; MacApp predefines certain
constants that specify these styles in the file UMacApp.p. SetStyle is called by
TListView.IRes and TListView.IListView to set an initial text style for TListView
objects. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TListView.VPointToItem
æD FUNCTION TListView.VPointToItem(thePoint: VPoint): INTEGER;
æFm UInspector.inc1.p
æT METHOD
æC VPointToItem maps a specified point to an item in the TListView list and returns
the item’s index. The parameter thePoint is the point, described in view
coordinates, that this method maps to an item in a TListView list. VPointToItem is
called by the DoMouseCommand methods of TListView and TObjectView to map mouse
clicks to user selections in a TListView list. This method is internal to the
MacApp Inspector; you cannot call it yourself or override it.
æKY TNewDocCommand.DoIt
æD PROCEDURE TNewDocCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt creates a new document when the user chooses the New command from the File
menu. MacApp calls this method when the user chooses the New item from the
application's File menu. You never need to call the DoIt method yourself.
æKY TNewDocCommand.Fields
æD PROCEDURE TNewDocCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TNewDocCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TNewDocCommand object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TNewDocCommand.INewDocCommand
æD PROCEDURE TNewDocCommand.INewDocCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC INewDocCommand initializes a TNewDocCommand object and associates it with a
command number. The itsCmdNumber parameter is the command number that is associated
with a particular menu command—in this case, the New command normally found in
an application's File menu. The command number is used in the 'cmnu' resource
in the resource description file; you will typically define a constant to
represent that number in both the resource description file and in the appropriate
interface or implementation file of the application. MacApp calls this method
when the user chooses the New item from the File menu. You never need to call
INewDocCommand yourself.
æKY TNoChangesCommand.Fields
æD PROCEDURE TNoChangesCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TNoChangesCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TNoChangesCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TNoChangesCommand.INoChangesCommand
æD PROCEDURE TNoChangesCommand.INoChangesCommand(itsCmdNumber: CmdNumber;
itsDocument: TDocument; itsView: TView; itsScroller: TScroller);
æFi UMacApp.p
æT METHOD
æC INoChangesCommand initializes a TNoChangesCommand object and associates it with
a command number. The method also sets the fCanUndo and fCausesChange fields to
FALSE. The itsCmdNumber parameter specifies which menu command was chosen by
the user. The itsDocument parameter is a reference to the document associated
with the command object. The itsView parameter is a reference to the view
associated with the command object. The itsScroller parameter is a reference to the
scroller associated with the command object. If you create a subclass of
TNoChangesCommand, you can call INoChangesCommand from the initialization method of
that subclass.
æKY TNumberText.Fields
æD PROCEDURE TNumberText.Fields (PROCEDURE DoToField (fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TNumberText object to the
MacApp Inspector.
DoToField is a procedure that MacApp passes to Fields to report the contents of each
field. Fields iterates over all the fields of the TNumberText object, performing
DoToField on each one. The fieldName parameter is the name of the field. The fieldAddr
parameter is the field’s location in memory. The fieldType parameter uses a predefined
constant to tell Fields what type of information to look for in a field.
MacApp calls Fields from the MacApp Inspector. You must override this method in
your subclasses if you want the Inspector to display your fields. Your override must
call INHERITED Fields as its last action to ensure that the inherited fields are also
displayed.
æKY TNumberText.GetValue
æD FUNCTION TNumberText.GetValue: LONGINT;
æFi UDialog.p
æT METHOD
æC This method converts the object's string value to the corresponding integer and
returns the result. The number text may begin with a plus or minus sign.
GetValue is called by TNumberText.WRes to initialize certain fields of a TNumberText
object. You can use GetValue to convert a string value to an Integer value.
æKY TNumberText.INumberText
æD PROCEDURE TNumberText.INumberText (itsSuperView: TView; itsLocation,
itsSize: VPoint; itsValue, itsMinimum, itsMaximum: INTEGER);
æFi UDialog.p
æT METHOD
æC This method initializes a TNumberText text item and installs it in the given
superview. The itsSuperView parameter is the view in which the text appears. The
itsLocation parameter is the location of the control in view coordinates. The
itsSize parameter is the size of the control in pixels. The itsValue parameter is
the current value of the number text. The itsMinimum parameter is the minimum
allowable value of the number text. The itsMaximum parameter is the maximum
allowable value of the number text.
æKY TNumberText.IRes
æD PROCEDURE TNumberText.IRes (itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TNumberText object from a 'view' resource template. The
fDefChoice field is set to mEditTextHit. The itsDocument parameter specifies the
document associated with the TNumberText object. The itsSuperView parameter
specifies the TView object into which the view is to be installed; for a TNumberText
object, this is usually a TEditText object. The itsParams parameter is a
pointer to the portion of the 'view' resource data used to initialize this view. When
the IRes method finishes initializing the view, the method moves the pointer
to the end of this data. MacApp calls this method for each of the views created
from a 'view' resource template, usually in response to a NewTemplateWindow or
a DoCreateViews call. You never need to call IRes yourself.
æKY TNumberText.SetValue
æD PROCEDURE TNumberText.SetValue (newValue: LONGINT; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method sets the text to the given value, redrawing the view if requested.
The newValue parameter is the value to be set. If redraw is set to TRUE, the
view is redrawn with the new text. If redraw is set to FALSE, then the view is not
redrawn even though the new text may affect its appearance. You should set
redraw to FALSE only when you know the view will eventually be redrawn and you
want to avoid drawing it twice, which makes the screen appear to flicker.
æKY TNumberText.Validate
æD FUNCTION TNumberText.Validate: BOOLEAN; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Validate returns TRUE if the number is a valid number within the range fMinimum
to fMaximum, inclusive. MacApp does not call this method; it is included for
your convenience. You can use Validate to ensure that numbers entered in a
TNumberText view fall within the range defined by the values of the fields fMinimum
and fMaximum.
æKY TNumberText.WRes
æD PROCEDURE TNumberText.WRes (theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TNumberText portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TNumberText section of the view’s resource template. WRes is the inverse of the
IRes method, and is used only by programs that write 'view' resources; for
example, ViewEdit uses this method to create new 'view' resources from views that
are active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources.
Your override should check the size of the space remaining in the template past
the end of the previously-written resource data; if there is not enough space
to write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams,
and the size of your resource data, in bytes. ExpandPtr expands the 'view'
resource handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too
big, because MacApp reclaims unused space by returning a new value for itsParams
when the WRes method completes.
æKY TNumberText.WriteRes
æD PROCEDURE TNumberText.WriteRes (theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('nmbr') and
class name ('TNumberText') for the ‘view’ resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TNumberText object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TObject.Clone
æD FUNCTION TObject.Clone: TObject;
æFi UObject.p
æT METHOD
æC Clone returns a copy of the TObject object. MacApp calls Clone from methods that
must create copies of objects. You can use this method in a similar fashion.
æKY TObject.DynamicFields
æD PROCEDURE TObject.DynamicFields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: integer));
æFi UObject.p
æT METHOD
æC DynamicFields reports the contents of each of an object’s dynamic areas to the
MacApp Inspector. DoToField is a procedure that MacApp passes to DynamicFields
to report the contents of each dynamic field. DynamicFields iterates over all
the object’s dynamic fields, performing DoToField on each one. In this way,
DynamicFields reports the contents of each dynamic field to the Inspector. MacApp
calls DynamicFields from the Inspector. You must override this method in your
subclasses if you want the Inspector to display your dynamic fields. Your version
of the method should call INHERITED DynamicFields so that the inherited dynamic
fields will also be displayed.
æKY TObject.Fields
æD PROCEDURE TObject.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UObject.p
æT METHOD
æC Fields reports the contents of each field of the TObject object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TObject
object, performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TObject.ForAllSubClassesDo
æD PROCEDURE TObject.ForAllSubClassesDo(PROCEDURE DoToSubClass(theClass: ObjClassID));
æFi UObject.p
æT METHOD
æC ForAllSubClassesDo iterates over all subclasses of the object’s class in
undefined order, performing the specified procedure on each one. DoToSubClass is the
procedure that MacApp performs on each subclass. You supply the procedure,
defining it yourself and passing a reference to it in the parameter DoToSubClass.
The procedure you write must accept one parameter, theClass; MacApp binds each
subclass in turn to this parameter and calls the DoToSubClass procedure. MacApp
does not call ForAllSubClassesDo. You can use this method to perform some
operation once for each subclass of a specified object’s class.
æKY TObject.ForAllSuperClassesDo
æD PROCEDURE TObject.ForAllSuperClassesDo(PROCEDURE
DoToSubClass(theClass: ObjClassID));
æFi UObject.p
æT METHOD
æC ForAllSuperClassesDo iterates over all superclasses of the object’s class,
performing the specified procedure on each one. DoToSubClass is the procedure that
MacApp performs on each subclass. You supply the procedure, defining it yourself
and passing a reference to it in the parameter DoToSubClass. The procedure you
write must accept one parameter, theClass; MacApp binds each subclass in turn
to this parameter and calls the DoToSubClass procedure. MacApp does not call
ForAllSuperClassesDo. You can call this method to perform an operation once for
each superclass of a specified object’s class.
æKY TObject.Free
æD PROCEDURE TObject.Free;
æFi UObject.p
æT METHOD
æC Free releases the memory used by the object. MacApp calls Free from a variety of
methods that dispose of objects. You must call Free only when you no longer
need access to the TObject object. You can override this method in TObject
subclasses to dispose of other objects to which the TObject object contains
references.
æKY TObject.GetClass
æD FUNCTION TObject.GetClass: ObjClassID;
æFi UObject.p
æT METHOD
æC GetClass returns the class identifier of the TObject object. MacApp calls
GetClass from a variety of methods whose behavior depends on the class of an object.
You can use this method in the same fashion.
æKY TObject.GetClassName
æD PROCEDURE TObject.GetClassName(VAR clName: MAName);
æFi UObject.p
æT METHOD
æC GetClassName returns a string containing the name of this object’s class. MacApp
calls GetClassName from a variety of methods that use the name of a class—for
example, the MacApp Inspector uses this method to obtain the name of an
object’s class for display in the Inspector window. You can use this method in a
similar fashion.
æKY TObject.GetClassSize
æD FUNCTION TObject.GetClassSize: INTEGER;
æFi UObject.p
æT METHOD
æC GetClassSize returns the minimum size, in bytes, of instances of this class.
MacApp calls GetClassSize from TObject.SetInstanceSize. You usually do not need to
call this method yourself.
æKY TObject.GetDynamicPtr
æD FUNCTION TObject.GetDynamicPtr: Ptr;
æFi UObject.p
æT METHOD
æC GetDynamicPtr returns a direct heap pointer to the start of the dynamic area
available to objects. It is important that you use this method with caution,
because the pointer can be invalidated if the heap is compacted.
æKY TObject.GetDynamicSize
æD FUNCTION TObject.GetDynamicSize: Size;
æFi UObject.p
æT METHOD
æC GetDynamicSize returns the current size, in bytes, of an instance, including the
fixed fields and the dynamic area.
æKY TObject.GetInspectorName
æD PROCEDURE TObject.GetInspectorName(VAR inspectorName: Str255);
æFi UObject.p
æT METHOD
æC GetInspectorName, when overridden, must return a string containing additional
information for display in the Inspector window. The default version is an empty
method. The inspectorName parameter must contain a text string when the method
returns; presumably, this string contains additional useful information about
the object. MacApp uses the various overrides of GetInspectorName to obtain
additional information about an object for display in the Inspector. You usually do
not need to call this method yourself.
æKY TObject.GetInstanceSize
æD FUNCTION TObject.GetInstanceSize: INTEGER;
æFi UObject.p
æT METHOD
æC GetInstanceSize returns the size, in bytes, of this object. MacApp calls
GetInstanceSize from methods that manipulate memory directly, such as TList methods.
A TList object can vary in size, so some TList methods call GetInstanceSize to
get the current size of the instance; most objects, however, are of a fixed
size. You usually do not need to call this method yourself.
æKY TObject.GetSuperClass
æD FUNCTION GetSuperClass: ObjClassID;
æFi UObject.p
æT METHOD
æC GetSuperClass returns the class identifier of the TObject object’s superclass.
You can use this method if the behavior of one of your methods varies according
to the class of an object.
æKY TObject.Initialize
æD PROCEDURE TObject.Initialize;
æFi UObject.p
æT METHOD
æC This method initializes a newly created instance of the TObject class. In MacApp
2.0, the default version is an empty method; in a future version of MacApp,
this method will be overridden for all MacApp subclasses to put the object into a
safe state. Eventually, all classes should override Initialize and call
INHERITED Initialize. Until all MacApp classes implement this behavior, calling
Initialize is appropriate only for immediate descendants of TObject, as is done for
the TShape object in the DrawShapes sample program and the TCell object in the
Calc sample program.
æKY TObject.Inspect
æD PROCEDURE TObject.Inspect;
æFi UObject.p
æT METHOD
æC Inspect creates a MacApp Inspector window for examining the contents of the
TObject object’s fields. It is provided for use with the MacApp debugger. MacApp
calls Inspect from applications compiled with debugging code when you use the I
command in the debugger. You usually do not need to call this method yourself.
æKY TObject.IObject
æD PROCEDURE TObject.IObject;
æFi UObject.p
æT METHOD
æC IObject initializes a newly created TObject object by calling
TObject.Initialize; that method puts the object in a safe state. MacApp calls IObject
when a new TObject object is created. Your IYourSubclass method should call its
ISuperClass method, which will call its ISuperClass method, and so on up the hierarchy
until TObject.IObject is called. If you create an immediate subclass of TObject,
the IYourClass method should call INHERITED IObject.
æKY TObject.IsMemberClass
æD FUNCTION TObject.IsMemberClass(testClass: ObjClassID): BOOLEAN;
æFi UObject.p
æT METHOD
æC MacAppIsMemberClass returns the value TRUE if the TObject is an instance of a
subclass of the specified class. The testClass parameter is the class identifier
that specifies the class in question. MacApp does not call IsMemberClass. You
can use this method to determine whether an object’s class is a subclass of a
specified class.
æKY TObject.IsSameClass
æD FUNCTION TObject.IsSameClass(testClass: ObjClassID): BOOLEAN;
æFi UObject.p
æT METHOD
æC IsSameClass returns TRUE if this instance is an instance of the specified class
and the specified object belongs to the same class. The testClass parameter is
the class identifier that specifies the class in question. MacApp does not call
IsSameClass. You can use this method if you need to determine whether an
object belongs to a specified class.
æKY TObject.Lock
æD FUNCTION TObject.Lock(lockIt: BOOLEAN): BOOLEAN;
æFi UObject.p
æT METHOD
æC This method locks or unlocks the object and returns its previous state. A locked
object cannot be moved in the heap. If the lockIt parameter is set to TRUE,
MacApp locks the object; if the lockIt parameter is set to FALSE, MacApp unlocks
the object. MacApp calls Lock from methods that must temporarily prevent an
object from moving in memory. You can use this method in a similar fashion.
æKY TObject.SetDynamicSize
æD PROCEDURE TObject.SetDynamicSize(newSize: Size);
æFi UObject.p
æT METHOD
æC SetDynamicSize sets the size, in bytes, of this instance's dynamic area. The
dynamic area is at first unallocated. The size setting applies only to the dynamic
area. The newsize parameter specifies the size of the dynamic area.
æKY TObject.SetInstanceSize
æD PROCEDURE TObject.SetInstanceSize(newSize: Size);
æFi UObject.p
æT METHOD
æC SetInstanceSize sets the size, in bytes, of the memory block that the object
occupies. The newSize parameter is the size that MacApp associates with the
object. If newSize is smaller than the value returned by TObject.GetClassSize, then
this method fails. MacApp calls SetInstanceSize when it creates a new object.
You usually do not need to call this method yourself.
æKY TObject.ShallowClone
æD FUNCTION TObject.ShallowClone: TObject;
æFi UObject.p
æT METHOD
æC ShallowClone returns an exact copy of the object. MacApp calls ShallowClone from
TObject.Clone. You usually do not need to call ShallowClone yourself. You can
call TObject.Clone to make copies of an object.TObject
æKY TObject.ShallowFree
æD PROCEDURE TObject.ShallowFree;
æFi UObject.p
æT METHOD
æC ShallowFree frees the instance without deallocating any of the objects to which
fields of this instance refer. MacApp calls ShallowFree from TObject.Free. You
usually do not need to call this method yourself. You can call TObject.Free if
you need to free an object.
æKY TObjectList.AddObject
æD PROCEDURE TObjectList.AddObject(theObject: TObject);
æFm UInspector.inc1.p
æT METHOD
æC AddObject appends an item to a TObjectList list. The parameter theObject is the
item that is added to the list. AddObject is used by TInspector.AddObject and
the global routine AddObjectToInspector. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TObjectList.Fields
æD PROCEDURE TObjectList.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TObjectList object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TObjectList object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
This method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TObjectList.IObjectList
æD PROCEDURE TObjectList.IObjectList(classId: ObjClassID);
æFm UInspector.inc1.p
æT METHOD
æC IObjectList initializes a TObjectList object and sets its object class ID. The
classId parameter is the object class ID of the objects that the list will
store. IObjectList is used internally by TInspector.AddObjectList; you cannot call
it yourself or override it.
æKY TObjectList.RemoveObject
æD PROCEDURE TObjectList.RemoveObject(theObject: TObject);
æFm UInspector.inc1.p
æT METHOD
æC RemoveObject removes an item from a TObjectList list. The parameter theObject is
the item to be removed from the list. RemoveObject is called by
TInspector.RemoveObject and the global routine RemoveObjectFromInspector. This method
is internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY John
æD
æT METHOD
æC Greetings, MacApp Hackers, from the authors of this reference!
æKY Bill
æD
æT METHOD
æC Greetings, MacApp Hackers, from the authors of this reference!
æKY Mikel
æD
æT METHOD
æC Greetings, MacApp Hackers, from the authors of this reference!
æKY TObjectView.ChangeSelection
æD PROCEDURE TObjectView.ChangeSelection(index: INTEGER; highlight: BOOLEAN); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC ChangeSelection selects a specified field in the Inspector window referenced by
fInspectWindow. The index parameter specifies the position in the list occupied
by the object to be selected. Items are numbered from the beginning of the
list, starting with 1. The highlight parameter is not used; it is included to keep
this method's declaration line consistent with its inherited method. This
method is internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.DoMouseCommand
æD FUNCTION TObjectView.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DoMouseCommand creates a new Inspector window that has the current selection
highlighted; it returns NIL if the user presses the Option key while clicking on
an item in an Inspector window. If the Option key is not pressed, this method
simply calls INHERITED DoMouseCommand. The parameter theMouse is the mouse
pointer’s current location, described in view coordinates. The info parameter is the
event record of the mouse-down event that caused DoMouseCommand to be called.
The hysteresis parameter is a point that represents the horizontal and vertical
distance the mouse can travel between clicks and still be considered to be at
the same location. MacApp uses this parameter to determine whether a double
click has occurred or if a control has moved. DoMouseCommand is called by
TView.HandleMouseDown when the user clicks on the content view of an Inspector window.
This method is internal to the Inspector; you cannot call it yourself or
override it.
æKY TObjectView.Draw
æD PROCEDURE TObjectView.Draw(area: Rect); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC This method draws an object’s name and type in a TObjectView list view,
truncating the string if necessary. The area parameter is a QuickDraw rectangle,
described in local coordinates, that defines part of the view that needs to be
redrawn. You can use this parameter to optimize drawing speed. MacApp calls this
method in response to an update event occurring in an Inspector window’s object
list subview. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TObjectView.Fields
æD PROCEDURE TObjectView.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TObjectView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TObjectView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
This method is internal to the Inspector; you cannot call it yourself or
override it.
æKY TObjectView.FirstFieldThat
æD PROCEDURE TObjectView.FirstFieldThat(FUNCTION TestField(fieldName: StringPtr;
fieldAddr: Ptr; fieldType: INTEGER): BOOLEAN);
æFm UInspector.inc1.p
æT METHOD
æC FirstFieldThat calls TestField for all of the fields of the current TObjectView
object. The MacApp Inspector calls this method when manipulating field data for
display in the Inspector window. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TObjectView.InspectControlHandle
æD PROCEDURE TObjectView.InspectControlHandle
(PROCEDURE InspectField(fieldName: Str255; fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectControlHandle displays a Control Manager control record in the Inspector
window. InspectField is a procedure that MacApp passes to InspectControlHandle.
It determines how the fields of the control record will appear in the
Inspector window. The fieldName parameter is the name of the field. The fieldAddr
parameter is the field's location in memory. The fieldType parameter uses a
predefined constant to specify the type of information that is displayed in a field.
InspectControlHandle is called by TObjectView.EachFieldDo when the Inspector
displays information about an object that represents a Control Manager control;
these objects are instances of TCtlMgr and its subclasses. This method is internal
to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.InspectGrafPtr
æD PROCEDURE TObjectView.InspectGrafPtr(PROCEDURE InspectField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectGrafPtr displays a QuickDraw grafPtr in the Inspector window.
InspectField is a procedure passed to InspectGrafPtr by MacApp. It determines how the
fields of the grafPtr’s associated grafPort will appear in the Inspector window.
The fieldName parameter is the name of the field. The fieldAddr parameter is the
field's location in memory. The fieldType parameter uses a predefined constant
to specify the type of information that is displayed in a field. InspectGrafPtr
is called by TObjectView.EachFieldDo and TObjectView.InspectWindowPtr when the
Inspector displays information about a QuickDraw grafPtr. This method is
internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.InspectHandle
æD PROCEDURE TObjectView.InspectHandle(PROCEDURE InspectField(fieldName: StringPtr;
fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectHandle displays the contents of a specified handle in the Inspector
window. InspectField is a procedure that MacApp passes to InspectHandle. It
determines how the contents of the handle will appear in the Inspector window. The
fieldName parameter is the name of the field. The fieldAddr parameter is the
field's location in memory. The fieldType parameter uses a predefined constant to
specify the type of information that is displayed in a field. InspectHandle is
called when the Inspector displays the fields of the record associated with a
handle. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TObjectView.InspectRgnHandle
æD PROCEDURE TObjectView.InspectRgnHandle(PROCEDURE InspectField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectRgnHandle displays a QuickDraw region in the Inspector window.
InspectField is a procedure passed to InspectRgnHandle by MacApp. It determines how
the fields of the region associated with the handle will appear in the Inspector
window. The fieldName parameter is the name of the field. The fieldAddr parameter
is the field's location in memory. The fieldType parameter uses a predefined
constant to specify the type of information that is displayed in a field.
InspectRgnHandle is called by TObjectView.EachFieldDo when the Inspector displays
information about a QuickDraw region. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TObjectView.InspectTEHandle
æD PROCEDURE TObjectView.InspectTEHandle(PROCEDURE InspectField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectTEHandle displays a TextEdit record in the Inspector window. InspectField
is a procedure passed to InspectTEHandle by MacApp. It determines how the
fields of the record associated with the handle will appear in the Inspector
window. The fieldName parameter is the name of the field. The fieldAddr parameter is
the field's location in memory. The fieldType parameter uses a predefined
constant to specify the type of information that is displayed in a field.
InspectTEHandle is called by TObjectView.EachFieldDo when the Inspector displays a
TextEdit record. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TObjectView.InspectWindowPtr
æD PROCEDURE TObjectView.InspectWindowPtr(PROCEDURE InspectField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFm UInspector.inc1.p
æT METHOD
æC InspectWindowPtr displays a Window Manager window record in the Inspector
window. InspectField is a procedure passed to InspectWindowPtr by MacApp. It
determines how the fields of the record associated with the pointer will appear in the
Inspector window. The fieldName parameter is the name of the field. The fieldAddr
parameter is the field's location in memory. The fieldType parameter uses a
predefined constant to specify the type of information that is displayed in a
field. InspectWindowPtr is called by TObjectView.EachFieldDo when the Inspector
displays information about a Window Manager window record. This method is
internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.InstallObject
æD PROCEDURE TObjectView.InstallObject(theObject: TObject; theObjectType: INTEGER);
æFm UInspector.inc1.p
æT METHOD
æC InstallObject installs the specified object in the view. The parameter theObject
specifies the new object to be installed. The parameter theObjectType
specifies the type of the object. MacApp predefines certain constants that serve as
object type identifiers in the file UObject.p. MacApp calls InstallObject when the
user selects a particular object from the list of active objects in the
Inspector window.This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TObjectView.IObjectView
æD PROCEDURE TObjectView.IObjectView(itsWindow: TInspectWindow; itsLocation: VPoint;
itsSize: VPoint);
æFm UInspector.inc1.p
æT METHOD
æC IObjectView initializes the fields of the TObjectView object. The itsWindow
parameter specifies the window in which the TObjectView object will appear. The
itsLocation parameter specifies the upper-left corner of the view in the window’s
local coordinates. The itsSize parameter is the size, in pixels, of the
TObjectView object, represented as a point in the window’s local coordinates.
IObjectView is called by TInspectWindow.IInspectWindow when it creates a new Inspector
window. This method is internal to the MacApp Inspector; you cannot call it
yourself or override it.
æKY TObjectView.IRes
æD PROCEDURE TObjectView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC IRes initializes a TObjectView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TObjectView object.
The itsSuperView parameter specifies the superview in which this view is to be
installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data. MacApp
calls this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. This
method is internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.LockObject
æD PROCEDURE TObjectView.LockObject;
æFm UInspector.inc1.p
æT METHOD
æC LockObject locks an active object so that it cannot be moved. MacApp uses
LockObject to protect objects that it is inspecting; methods that call LockObject are
TObjectView.Draw, TObjectView.InstallObject, and TObjectView.SelectField. This
method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TObjectView.Resize
æD PROCEDURE TObjectView.Resize(width, height: VCoordinate; invalidate: BOOLEAN);
OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Resize forces the view to redraw itself if the invalidate parameter is TRUE and
either of the width or height parameters has changed. The method then calls
INHERITED Resize. The width parameter is the view’s new horizontal dimension,
expressed in view coordinates. The height parameter is the view’s new vertical
dimension, expressed in view coordinates. If you set the value of the invalidate
parameter to TRUE, the view is invalidated, forcing it to be redrawn in the
update process. When you know the view will be redrawn eventually and wish to avoid
drawing it twice—which makes the screen appear to flash—you can set the
invalidate parameter to FALSE. MacApp calls Resize from methods that create or resize
Inspector windows. This method is internal to the Inspector; you cannot call it
yourself or override it.
æKY TObjectView.SelectField
æD PROCEDURE TObjectView.SelectField(index: INTEGER; inspectWindow: TInspectWindow);
æFm UInspector.inc1.p
æT METHOD
æC SelectField displays the contents of the specified field of the currently
selected object in the Inspector window. The index parameter specifies which field is
to be displayed. Fields are numbered from the beginning of the list in the
MacApp Inspector window, starting with 1. The inspectWindow parameter is the
TWindow object in which the Inspector displays the field. MacApp calls SelectField
when the user selects a field in the Inspector’s window. This method is internal
to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.SuperViewChangedSize
æD PROCEDURE TObjectView.SuperViewChangedSize(delta: VPoint;
invalidate: BOOLEAN); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC SuperViewChangedSize forces a redraw of the view if the value of the invalidate
parameter is TRUE, and then calls INHERITED SuperViewChangedSize. The delta
parameter specifies the amount by which the view changed size, expressed as a view
point. If you set the invalidate parameter to TRUE, the view is redrawn
immediately; if you set invalidate to FALSE, the view is not redrawn immediately,
even though the new values may affect its appearance. When you know the view will
be redrawn eventually and wish to avoid drawing it twice - which makes the
screen appear to flash - you can set the invalidate parameter to FALSE. MacApp
calls this method when resizing the views in an Inspector window. This method is
internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjectView.UnlockObject
æD PROCEDURE TObjectView.UnlockObject;
æFm UInspector.inc1.p
æT METHOD
æC UnlockObject unlocks an object that has been locked by TObjectView.LockObject,
allowing it to be moved. MacApp calls UnlockObject when the Inspector is
finished inspecting an object. This method is internal to the MacApp Inspector; you
cannot call it yourself or override it.
æKY SwenskaFlicka
æD
æT METHOD
æC Hi honey!! XOXOX
æKY TObjListView.DrawItem
æD PROCEDURE TObjListView.DrawItem(itemNumber: INTEGER; basePoint: Point); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC DrawItem draws an item occupying a specific position in a TObjListView list. The
itemNumber parameter specifies the position in the list occupied by the item
to be drawn. The basePoint parameter is the pen’s starting position, expressed
in global coordinates. DrawItem is called by the MacApp Inspector once for each
item in a TObjListView list when it is drawing that list. This method is
internal to the Inspector; you cannot call it yourself or override it.
æKY TObjListView.Fields
æD PROCEDURE TObjListView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC Fields reports the contents of each field of the TObjListView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TObjListView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
This method is internal to the MacApp Inspector; you cannot call it yourself
or override it.
æKY TObjListView.InstallObjectList
æD PROCEDURE TObjListView.InstallObjectList(theObjectList: TObjectList);
æFm UInspector.inc1.p
æT METHOD
æC This method installs a TObjListView list in a view, selects and highlights the
first item in the list, sets the size of the list, and then redraws it, making
sure the selection is visible. The parameter theObjectList is the TObjectList
list to be installed in the view. MacApp calls InstallObjectList to install a
TObjListView object in an Inspector window. This method is internal to the MacApp
Inspector; you cannot call it yourself or override it.
æKY TObjListView.IObjListView
æD PROCEDURE TObjListView.IObjListView(itsWindow: TInspectWindow;
itsLocation: VPoint; itsSize: VPoint);
æFm UInspector.inc1.p
æT METHOD
æC IObjListView initializes a scrolling TObjListView list that contains no items
and installs it in a window. The itsWindow parameter is the Inspector window in
which the class list is displayed. The itsLocation parameter is the location of
the list expressed in the window's local view coordinates. The itsSize
parameter is the size of the list expressed in pixels. IObjListView is called by
TInspectWindow.IInspectWindow when initializing a new Inspector window. This method
is internal to the MacApp Inspector; you cannot call it yourself or override it.
æKY TObjListView.IRes
æD PROCEDURE TObjListView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC IRes initializes a TObjListView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TObjListView
object. The itsSuperView parameter specifies the superview in which this view is to
be installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data. MacApp
calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call. This
method is internal to the MacApp Inspector; you cannot call it yourself or
override it.
æKY TObjListView.SelectItem
æD PROCEDURE TObjListView.SelectItem(itemNumber: INTEGER); OVERRIDE;
æFm UInspector.inc1.p
æT METHOD
æC SelectItem selects a specified TObjListView element and then calls INHERITED
SelectItem. INHERITED SelectItem is empty; when overridden, it can do something to
the new selection. The itemNumber parameter is the selected item’s position in
the TObjListView list. Items in a TObjListView list are numbered consecutively
from the beginning of the list, starting with 1. This method is internal to
the Inspector; you cannot call it yourself or override it.
æKY TOldDocCommand.DoIt
æD PROCEDURE TOldDocCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt presents the user with a Standard File dialog box and then opens the
document selected by the user. MacApp calls this method when the user chooses the
Open item from the application's File menu. You never need to call the DoIt method
yourself.
æKY TOldDocCommand.Fields
æD PROCEDURE TOldDocCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TOldDocCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TOldDocCommand object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TOldDocCommand.IOldDocCommand
æD PROCEDURE TOldDocCommand.IOldDocCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IOldDocCommand initializes a TOldDocCommand object and associates it with a
command number. The itsCmdNumber parameter is the command number that is associated
with a particular menu command—in this case, the Open command in the
application's File menu. The command number is used in the 'cmnu' resource in the
resource description file; you typically define a constant to represent that number
in both the resource description file and in the appropriate interface or
implementation file of the application. MacApp calls this method when the user
chooses the Open item from the File menu. You never need to call IOldDocCommand
yourself.
æKY TPattern.Draw
æD PROCEDURE TPattern.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws a fill pattern and then calls INHERITED Draw to draw the rest
of the control. The area parameter is a QuickDraw rectangle, described in local
coordinates, that defines part of the control that needs to be redrawn. You
can use this parameter to optimize drawing speed. MacApp does not call this
method; it is provided for your convenience. You can call this method to fill a
specified rectangle with the pattern of your choice.
æKY TPattern.Fields
æD PROCEDURE TPattern.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TPattern object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TPattern
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TPattern.Free
æD PROCEDURE TPattern.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TPattern fill pattern and then calls
INHERITED Free to release the memory used by dependent structures. MacApp calls Free
in the normal process of freeing TView objects; for example, if the pattern is
a subview of a dialog box, the dialog view will free the pattern for you when
the dialog box is closed. You must call this method if you allocated and managed
the pattern object yourself.
æKY TPattern.IPattern
æD PROCEDURE TPattern.IPattern(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet,itsVSizeDet: SizeDeterminer; itsRsrcID: INTEGER; preferColor: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method initializes a TPattern item and installs it in the given superview.
The fDefChoice field is set to mPatternHit. The itsSuperView parameter is the
view in which the pattern appears. The itsLocation parameter is the pattern's
location, in view coordinates. The itsSize parameter is the pattern's size, in
pixels. The itsHSizeDet and itsVSizeDet parameters determine how the view's
horizontal and vertical dimensions are calculated, respectively. Possible values
are: sizeSuperView (subview is the same size as superview), sizeRelSuperView
(subview size changes an equal amount relative to the superview's size), sizePage
(view is made the size of one page), sizeFillPages (view grows to fill an exact
number of pages), sizeVariable (view size fluctuates according to
application-specific criteria), or sizeFixed (no special handling of size issues). The
itsRsrcID parameter is the integer that MacApp uses to refer to the view's resource.
Set preferColor to TRUE if you want MacApp to create the pattern using a 'ppat'
resource; otherwise, MacApp uses a 'PAT ' resource. You can call this method
to initialize a TPattern object.
æKY TPattern.IRes
æD PROCEDURE TPattern.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TPattern object from a 'view' resource template. The
fDefChoice field is set to mPatternHit. The itsDocument parameter specifies the
document associated with the control for which this pattern is being created. The
itsSuperView parameter specifies the view in which this pattern appears. The
itsParams parameter is a pointer to the portion of the 'view' resource data used to
initialize this view. When the IRes method finishes initializing the view, the
method moves the pointer to the end of this data. MacApp calls this method for
each of the views created from a 'view' resource template, usually in response
to a NewTemplateWindow or a DoCreateViews call. You never need to call IRes
yourself.
æKY TPattern.ReleasePattern
æD PROCEDURE TPattern.ReleasePattern;
æFi UDialog.p
æT METHOD
æC This method releases memory used by a TPattern resource. ReleasePattern is
called byTPattern.SetPattern before creating a new pattern. It is also called by
TPattern.Free. You probably will not need to call this method.
æKY TPattern.SetPattern
æD PROCEDURE TPattern.SetPattern(thePattern: Handle; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SetPattern sets a control's pattern to that specified. This handle is stored in
the fDataHandle field. The parameter thePattern is a handle to the pattern
resource designated as the control's fill pattern. When the value of the redraw
parameter is TRUE, the control is redrawn. When you set the value of redraw to
FALSE, the control is not redrawn even though its appearance may be affected by
the change. You can set redraw to FALSE when you know the control will be redrawn
eventually and you wish to avoid drawing it twice, which makes the screen
appear to flicker. You can call this method when you want to change the displayed
pattern.
æKY TPattern.WRes
æD PROCEDURE TPattern.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TPattern portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TPattern section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TPattern.WriteRes
æD PROCEDURE TPattern.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('patn') and
class name ('TPattern') for the ‘view’ resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TPattern object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or signature.
æKY TPicture.Draw
æD PROCEDURE TPicture.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws to scale the picture specified by the object’s fDataHandle
field. It then calls INHERITED Draw to finish drawing the rest of the control. The
area parameter is a QuickDraw rectangle, described in local coordinates, that
defines part of the control that needs to be redrawn. You can use this
parameter to optimize drawing speed. MacApp calls this method in response to an update
event occurring in the TPicture view. You usually do not need to call this
method yourself.
æKY TPicture.Fields
æD PROCEDURE TPicture.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TPicture object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TPicture
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TPicture.Free
æD PROCEDURE TPicture.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TPicture object and then calls INHERITED
Free to release memory used by dependent structures. Free is called by
TPicture.IPicture when the initalization fails. In this case, the old TPicture object
is freed before a new one is created. Similarly, TPicture.IRes frees the old
resource when the initialization fails. You can use the Free method in a similar
fashion.
æKY TPicture.IPicture
æD PROCEDURE TPicture.IPicture(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsRsrcID: INTEGER);
æFi UDialog.p
æT METHOD
æC IPicture creates a TPicture object and installs it in the given superview. The
fDefChoice field is set to mPictureHit. The itsSuperView parameter is the view
in which the picture appears. The itsLocation parameter is the picture's
location, in view coordinates. The itsSize parameter is the picture's size in pixels.
The itsHSizeDet and itsVSizeDet parameters determine how the view's horizontal
and vertical dimensions are calculated, respectively. Possible values are:
sizeSuperView (subview is the same size as superview), sizeRelSuperView (subview
size changes an equal amount relative to the superview's size), sizePage (view is
made the size of one page), sizeFillPages (view grows to fill an exact number
of pages), sizeVariable (view size fluctuates according to application-specific
criteria), or sizeFixed (no special handling of size issues). The itsRsrcID
parameter is the integer that MacApp uses to refer to the view's resource. You
can call this method to initialize a TPicture object.
æKY TPicture.IRes
æD PROCEDURE TPicture.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TPicture object from a 'view' resource template. The
fDefChoice field is set to mPictureHit. The itsDocument parameter specifies the
document associated with the TPicture object. The itsSuperView parameter specifies the
view in which this picture appears. The itsParams parameter is a pointer to
the portion of the 'view' resource data used to initialize this view. When the
IRes method finishes initializing the view, the method moves the pointer to the
end of this data. MacApp calls this method for each of the views created from a
'view' resource template, usually in response to a NewTemplateWindow or a
DoCreateViews call. You never need to call IRes yourself.
æKY TPicture.ReleasePicture
æD PROCEDURE TPicture.ReleasePicture;
æFi UDialog.p
æT METHOD
æC This method releases memory used by the handle to the picture data.
ReleasePicture is called by TPicture.SetPicture before creating a new picture. It is
also called by TPicture.Free. You probably will not need to call this method.
æKY TPicture.SetPicture
æD PROCEDURE TPicture.SetPicture(thePicture: PicHandle; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SetPicture saves a handle to the picture data associated with a TPicture object,
and redraws it if requested. The parameter thePicture is the handle to the
picture data. If the value of the redraw parameter is TRUE, the picture will be
redrawn. If the value of redraw is FALSE, the picture will not be redrawn even
though its appearance may be affected by the change. You set redraw to FALSE only
when you know the picture will eventually be redrawn and you want to avoid
drawing it twice, which makes the screen appear to flicker. You can call this
method when you want to change the displayed picture.
æKY TPicture.WRes
æD PROCEDURE TPicture.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TPicture portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TPicture section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TPicture.WriteRes
æD PROCEDURE TPicture.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('pict') and
class name ('TPicture') for the ‘view’ resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TPicture object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or signature.
æKY TPopup.AdjustBotRight
æD PROCEDURE TPopup.AdjustBotRight;
æFi UDialog.p
æT METHOD
æC AdjustBotRight is a utility method that determines the bottom and right sides of
the view, based on the menu information, and adjusts the view accordingly.
AdjustBotRight is called by TPopup.SetPopup when the user clicks on a pop-up menu.
You call this method yourself only when you are changing items in the pop-up menu.
æKY TPopup.CalcLabelRect
æD PROCEDURE TPopup.CalcLabelRect(VAR theRect: Rect);
æFi UDialog.p
æT METHOD
æC This method calculates the rectangle for a pop-up menu item's label. The
parameter theRect passes the rectangle that bounds the menu's label and returns the
new value of this rectangle once the inset has been calculated. CalcLabelRect is
called by TPopup.DoMouseCommand and TPopup.DrawLabel when the user chooses a
pop-up menu item. You never need to call it yourself.
æKY TPopup.CalcMenuRect
æD PROCEDURE TPopup.CalcMenuRect(VAR theRect: Rect);
æFi UDialog.p
æT METHOD
æC This method calculates the rectangle for the pop-up menu itself—that is, the
menu minus its title string. The parameter theRect passes the rectangle that
bounds the menu item's active area and returns the new value of this rectangle once
the inset has been calculated. CalcMenuRect is called by TPopup.DoMouseCommand,
TPopup.Draw, and TPopup.DrawPopupBox when the user clicks on a pop-up menu.
æKY TPopup.DoMouseCommand
æD FUNCTION TPopup.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UDialog.p
æT METHOD
æC DoMouseCommand performs the appropriate actions to process a mouse click in a
pop-up menu and returns NIL. This method determines which command was chosen,
sets the value of the object’s fCurrentItem field, and calls TPopup.DoChoice to
perform the specified command or make the specified choice. The parameter
theMouse is the mouse pointer’s current location, described in view coordinates. The
info parameter is the event record of the mouse-down event that caused
DoMouseCommand to be called. The hysteresis parameter is a point that represents the
horizontal and vertical distance the mouse can travel between clicks and still be
considered to be at the same location. MacApp uses this parameter to determine
whether a double click has occurred or if a control has moved. DoMouseCommand
is called when MacApp receives a mouse-down event in a TPopup object. Do not
call this method yourself.
æKY TPopup.Draw
æD PROCEDURE TPopup.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws the pop-up box and the menu’s label and then calls INHERITED
Draw. The area parameter is a QuickDraw rectangle, described in local
coordinates, that defines part of the control that needs to be redrawn. You use the
parameter to optimize drawing speed. MacApp calls this method in response to an
update event occurring in the pop-up menu. You usually do not need to call this
method yourself.
æKY TPopup.DrawLabel
æD PROCEDURE TPopup.DrawLabel(area: Rect);
æFi UDialog.p
æT METHOD
æC This method draws the pop-up menu's label. The area parameter is the rectangle
that defines the active area of the pop-up menu. DrawLabel is called by
TPopup.Draw and TPopup.DoMouseCommand when the user clicks on a pop-up menu.
æKY TPopup.DrawPopupBox
æD PROCEDURE TPopup.DrawPopupBox(area: Rect);
æFi UDialog.p
æT METHOD
æC DrawPopupBox draws a blank pop-up menu—that is, minus the menu's label—with a
one-pixel drop shadow. The area parameter is a QuickDraw rectangle described in
local coordinates that defines the part of the control that needs to be redrawn.
You use the parameter to optimize drawing speed. DrawPopupBox is called by
TPopup.Draw and TPopup.SetCurrentItem when the user clicks on or chooses an item
from a pop-up menu.
æKY TPopup.Fields
æD PROCEDURE TPopup.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TPopup object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TPopup object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TPopup.Free
æD PROCEDURE TPopup.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the TPopup object and its resources and then
calls INHERITED Free to release the memory used by dependent structures. MacApp
calls this method in the normal process of freeing objects. You must call Free
if you allocated the pop-up menu and have managed it yourself.
æKY TPopup.GetCurrentItem
æD FUNCTION TPopup.GetCurrentItem: INTEGER;
æFi UDialog.p
æT METHOD
æC This method returns the number of the currently selected menu item. Menu items
are numbered starting from 1. You can call this method when you need to know
which menu item is currently selected.
æKY TPopup.GetItemText
æD PROCEDURE TPopup.GetItemText(item: INTEGER; VAR theText: Str255);
æFi UDialog.p
æT METHOD
æC GetItemText returns the text of the menu item specified in the item parameter.
The item parameter is the integer associated with a particular menu item. The
parameter theText stores the string associated with that menu item. MacApp does
not call this method; if is included for your convenience. You can call this
method to obtain the text of the menu item.
æKY TPopup.IPopup
æD PROCEDURE TPopup.IPopup(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet,itsVSizeDet: SizeDeterminer; itsRsrcID,
itsCurrentItem,itsItemOffset: INTEGER);
æFi UDialog.p
æT METHOD
æC IPopup initializes a pop-up menu and installs it in the given superview. The
menu's title is drawn flush right, starting at fItemOffset. The pop-up selector is
drawn to the right of fItemOffset, the width and height being determined from
the dimensions of the pop-up menu. The fDefChoice field is set to mPopupHit.
The itsSuperView parameter is the view in which the pop-up menu appears. The
itsLocation parameter is the pop-up menu's location, in view coordinates. The
itsSize parameter is the pop-up menu's size, in pixels. The itsHSizeDet and
itsVSizeDet parameters determine how the view's horizontal and vertical dimensions are
calculated, respectively. Possible values are sizeSuperView (subview is the
same size as superview), sizeRelSuperView subview size changes an equal amount
relative to the superview's size), sizePage (view is made the size of one page),
sizeFillPages (view grows to fill an exact number of pages), sizeVariable (view
size fluctuates according to application-specific criteria), or sizeFixed no
special handling of size issues). The itsRsrcID parameter is the pop-up menu's
resource identifier. The itsCurrentItem parameter is an integer that specifies
which menu item should be the default selection; that is, the first one selected.
The itsItemOffset parameter is an integer specifying the distance from the
left edge of the view to the pop-up box. MacApp does not call this method; it is
included for your convenience. You call this method to initialize your pop-up object.
æKY TPopup.IRes
æD PROCEDURE TPopup.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TPopup object from a 'view' resource template. The fDefChoice
field is set to mPopupHit. The itsDocument parameter specifies the document
associated with the TPopup object. The itsSuperView parameter specifies the view
in which the menu appears. The itsParams parameter is a pointer to the portion
of the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a DoCreateViews
call. You never need to call IRes yourself.
æKY TPopup.ReleasePopup
æD PROCEDURE TPopup.ReleasePopup;
æFi UDialog.p
æT METHOD
æC ReleasePopup frees memory for a TPopup object's menu resource. ReleasePopup is
called by TPopup.SetPopup before creating a new pop-up menu. It is also called
by TPopup.Free. You probably will not need to call this method.
æKY TPopup.SetCurrentItem
æD PROCEDURE TPopup.SetCurrentItem(item: INTEGER; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method sets fCurrentItem to the specified item in a pop-up menu, redrawing
the menu if requested. The item parameter is the element to be selected in a
particular pop-up menu. If the value of the value of the redraw parameter is
TRUE, MacApp redraws the menu to reflect the new selection. If the value of the
redraw parameter is FALSE, the menu will not be redrawn, even though the new
selection may affect its appearance. You set redraw to FALSE only when you know the
menu will eventually be redrawn and you want to avoid drawing it twice, which
makes the screen appear to flicker. SetCurrentItem is called by TPopup.SetPopup
when initializing a new pop-up menu and by TPopup.DoMouseCommand when the user
chooses an item from a pop-up menu.
æKY TPopup.SetPopup
æD PROCEDURE TPopup.SetPopup(theMenu: MenuHandle; theRsrcID, currentItem: INTEGER;
redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method stores the information pointed at by theMenu in the fields of the
pop-up menu, sets the currently selected item, and redraws the menu if requested
to do so. The parameter theMenu is a handle to the menu's parameters. The
parameter theRsrcID is the integer that identifies the 'view' resource template used
to create the menu. The currentItem parameter is the current selection in the
menu. If you set the value of the redraw parameter to TRUE, the menu is redrawn
to reflect the new selection. If you set the value of the redraw parameter to
FALSE, the menu is not redrawn even though the new selection may affect its
appearance. You can set redraw to FALSE when you know the control will be redrawn
eventually and you wish to avoid drawing it twice, which makes the screen
appear to flicker. SetPopup is called by TPopup.IPopup when initializing a pop-up
menu procedurally; it is also called by TPopup.IRes when creating a pop-up menu
from a 'view' resource. You can use it to set the contents of the fields of a
pop-up menu.
æKY TPopup.WRes
æD PROCEDURE TPopup.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TPopup portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the TPopup
section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are active
on the screen. You rarely need to call this method yourself. You must override
this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the end of
the previously-written resource data; if there is not enough space to write
your data into the file, your override should call the global routine ExpandPtr,
passing as arguments the current values of theResource, itsParams, and the size
of your resource data, in bytes. ExpandPtr expands the 'view' resource handle
by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater. You
need not be concerned about making the 'view' resource handle too big, because
MacApp reclaims unused space by returning a new value for itsParams when the
WRes method completes.
æKY TPopup.WriteRes
æD PROCEDURE TPopup.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('popp') and
class name ('TPopup') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the view’s
resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a TPopup
object as part of a 'view' resource; you can use it in a similar fashion. You
can override this method to provide your own unique class name or signature.
æKY TPrintCommand.DoIt
æD PROCEDURE TPrintCommand.DoIt;
æFi UPrinting.p
æT METHOD
æC DoIt does the actual printing using the print handler referenced by
fStdPrintHandler. MacApp calls this method when the user chooses the Print or
Print One item from the File menu. You never need to call the DoIt method yourself.
æKY TPrintCommand.Fields
æD PROCEDURE TPrintCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Fields reports the contents of each field of the TPrintCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TPrintCommand object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TPrintCommand.IPrintCommand
æD PROCEDURE TPrintCommand.IPrintCommand(itsCmdNumber: CmdNumber;
theStdPrintHandler: TStdPrintHandler);
æFi UPrinting.p
æT METHOD
æC IPrintCommand initializes a TPrintCommand object, associates it with a command
number, and does some miscellaneous initialization for printing. The
itsCmdNumber parameter is the command number that is associated with a particular menu
command—in this case, the Print command typically found in an application's File
menu. The command number is used in the 'cmnu' resource in the resource
description file; you typically define a constant to represent that number in both the
resource description file and in the appropriate interface or implementation
file of the application. The parameter theStdPrintHandler is the object of class
TStdPrintHandler that prints a particular view or document. IPrintCommand is
called by TStdPrintHandler.DoMenuCommand when the user chooses the Print, Print
One, Page Setup, or Show Page Breaks items normally found in the File menu. You
never need to call it yourself.
æKY TPrintHandler.BreakFollowing
æD FUNCTION TPrintHandler.BreakFollowing(vhs: VHSelect; prevBreak: VCoordinate;
VAR automatic: BOOLEAN): VCoordinate;
æFi UMacApp.p
æT METHOD
æC BreakFollowing, when overridden, must return the location of the page break that
follows the specified page break. The vhs parameter specifies whether the page
break to be found is a horizontal or vertical page break; a value of h
specifies a horizontal break, and a value of v specifies a vertical one. The prevBreak
parameter specifies the page break preceding the one that is to be found.
BreakFollowing must set the parameter automatic to TRUE if the returned value
specifies an automatic page break—that is, a page break that is computed by the
application rather than one that the user has set. The default version of the
method causes a program break with an error message in debug mode; TPrintHandler
subclasses must override it to provide useful behavior. MacApp calls
BreakFollowing from TView.DoBreakFollowing when it needs to determine the location of
a particular page break. You usually do not need to call this method yourself.
æKY TPrintHandler.CalcPageStrips
æD PROCEDURE TPrintHandler.CalcPageStrips(VAR pageStrips: Point);
æFi UMacApp.p
æT METHOD
æC CalcPageStrips calculates the height and width of the TPrintHandler’s associated
view. The result is expressed in numbers of pages in each dimension.
CalcPageStrips stores the result of its calculation in pageStrips. MacApp calls
CalcPageStrips from methods that prepare the view’s image for printing. You usually do
not need to call this method yourself. The default version of the method causes
a program break with an error message in debug mode; TPrintHandler subclasses
must override it to provide useful behavior.
æKY TPrintHandler.CalcViewPerPage
æD PROCEDURE TPrintHandler.CalcViewPerPage(VAR amtPerPage: VPoint);
æFi UMacApp.p
æT METHOD
æC CalcViewPerPage calculates the portion of the TPrintHandler’s associated view
that will appear on each printed page. The result is expressed in numbers of
pixels in each dimension. CalcViewPerPage stores the result of its calculation in
amtPerPage. MacApp calls CalcViewPerPage from methods that prepare the view’s
image for printing. You usually do not need to call this method yourself. The
default version of the method causes a program break with an error message;
TPrintHandler subclasses must override it to provide useful behavior.
æKY TPrintHandler.CheckPrinter
æD PROCEDURE TPrintHandler.CheckPrinter;
æFi UMacApp.p
æT METHOD
æC CheckPrinter determines whether the printer-configuration parameters have
changed. If they have changed, then this method changes the object’s corresponding
fields to reflect the new configuration. MacApp calls CheckPrinter from a variety
of methods that use printer-configuration information. You usually do not need
to call this method yourself. The default version of CheckPrinter is an empty
method; TPrintHandler subclasses must override this method to provide useful
behavior.
æKY TPrintHandler.DrawPageBreak
æD PROCEDURE TPrintHandler.DrawPageBreak(vhs: VHSelect; whichBreak: INTEGER;
loc: VCoordinate; automatic: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DrawPageBreak, when overridden, must draw a representation of a page break at a
specified location in a view. The default method is empty. The vhs parameter
specifies whether the page break to be drawn is vertical or horizontal; a value
of v specifies that page 2 is below page 1, and h specifies that page 2 is to
the right of page 1. The whichBreak parameter specifies which page break in
numerical sequence is to be drawn. Page breaks are numbered from the end of the
first page, beginning with 1. The loc parameter specifies the top-left corner of
the page in view coordinates. The parameter automatic specifies whether the page
break was computed automatically by the application or was placed manually by
the user; if the value of automatic is TRUE, then the page break was computed
automatically. MacApp calls DrawPageBreak when it needs to draw the contents of a
printable view. You usually do not need to call this method yourself.
æKY TPrintHandler.DrawPrintFeedback
æD PROCEDURE TPrintHandler.DrawPrintFeedback(area: Rect);
æFi UMacApp.p
æT METHOD
æC DrawPrintFeedback draws the associated view’s page breaks, page numbers, and
borders. It can also draw additional information, such as tab stops and rulers.
The area parameter specifies the rectangular area of the view that is visible on
the screen. MacApp calls DrawPrintFeedback when it needs to display a view’s
printing information, such as page breaks and page numbers. You usually do not
need to call this method yourself.
æKY TPrintHandler.Fields
æD PROCEDURE TPrintHandler.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TPrintHandler object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TPrintHandler object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TPrintHandler.FocusOnInterior
æD PROCEDURE TPrintHandler.FocusOnInterior; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC FocusOnInterior sets the QuickDraw clipping region to the printable area of the
view. MacApp calls FocusOnInterior from TStdPrintHandler.PrintPage. You usually
do not need to call this method yourself. The default version of
FocusOnInterior is an empty method. TPrintHandler subclasses must override
FocusOnInterior
to provide the appropriate behavior.
æKY TPrintHandler.GetInspectorName
æD PROCEDURE TPrintHandler.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName retrieves the name of the TPrintHandler object for display in
the Inspector window. GetInspectorName uses the value of inspectorName when the
method is called to create the name that will appear in he MacApp Inspector.
The method appends the name and the address in memory of the TPrintHandler object
to the value passed in inspectorName, then stores the result back into
inspectorName. The parameter then holds that result when the method returns. MacApp
calls GetInspectorName when the Inspector displays information about the
TPrintHandler object. You usually do not need to call this method yourself.
æKY TPrintHandler.IPrintHandler
æD PROCEDURE TPrintHandler.IPrintHandler(itsView: TView);
æFi UMacApp.p
æT METHOD
æC IPrintHandler initializes the TPrintHandler object and associates it with its
view. The itsView parameter is the TView object with which the TPrintHandler
object is to be associated. MacApp calls IPrintHandler when it creates a new
TPrintHandler object. You must call this method when you create TPrintHandler
objects. Do not override IPrintHandler.
æKY TPrintHandler.LocatePageInterior
æD PROCEDURE TPrintHandler.LocatePageInterior(pageNumber: INTEGER; VAR loc: Point);
æFi UMacApp.p
æT METHOD
æC LocatePageInterior determines the view coordinates of the top-left corner of a
printed page that corresponds to the TPrintHandler object’s associated view. The
pageNumber parameter is the number of the page whose interior is to be
located. MacApp stores the resulting location in the loc parameter. MacApp calls
LocatePageInterior when it must specify the area of a view that is to be printed on
a page. You usually do not need to call this method yourself. The default
version of LocatePageInterior is an empty method. TPrintHandler subclasses must
override this method to provide useful behavior.
æKY TPrintHandler.MaxPageNumber
æD FUNCTION TPrintHandler.MaxPageNumber: INTEGER;
æFi UMacApp.p
æT METHOD
æC MaxPageNumber returns the highest page number that could be reasonably printed,
given the properties of the view. The default version sets the maximum page
number to 0. The resulting value is not necessarily as large as the actual number
of pages if the view to be printed is very large—for example, spreadsheets can
occupy more area than could reasonably be printed. MacApp calls MaxPageNumber
when it prepares to print a view. You usually do not need to call this method
yourself.
æKY TPrintHandler.Print
æD FUNCTION TPrintHandler.Print(itsCmdNumber: CmdNumber;
VAR proceed: BOOLEAN): TCommand;
æFi UMacApp.p
æT METHOD
æC Print handles a request to print the contents of the TPrintHandler’s associated
view and returns a TCommand object to handle printing. The itsCmdNumber
parameter is a command number that specifies how the printing is to be done. MacApp
defines several predefined command numbers for printing from the File menu. These
predefined command numbers include the following: cPrFileBase (= 176)
cPrFileMax (= 195) ( Note: Command numbers between cPrFileBase and cPrFileMax are sent
to a document's fDocPrintHandler even if it is not in the fTarget chain.)
cPageSetup (Page Setup) cPrintOne(Print One) cPrint(Print) cPrintToFile(Print to
File) cPrintSpoolFile(Print Spooled File) cPrViewBase (= 201) cPrViewMax (= 250)
(Note: Command numbers between cPrViewBase and cPrViewMax are printing commands
applied to a displayed view in the fTarget chain.) cShowBorders (Show View
Borders). The proceed parameter is a flag that is set to TRUE when MacApp
determines that it is okay to print. The default version of this method simply sets
proceed to TRUE. MacApp calls Print to print the contents of the TPrintHandler’s
associated view. You usually do not need to call this method yourself. The
default version of Print does not actually print the associated view, and returns
NIL. TPrintHandler subclasses must override Print to provide appropriate behavior.
æKY TPrintHandler.PrinterChanged
æD PROCEDURE TPrintHandler.PrinterChanged;
æFi UMacApp.p
æT METHOD
æC PrinterChanged changes the fields of the TPrintHandler object in accordance with
new printer-configuration information. MacApp calls PrinterChanged when it
determines that printer-configuration information has changed. The default version
is an empty method. TPrintHandler subclasses must override this method to
provide useful behavior. You usually do not need to call this method yourself.
æKY TPrintHandler.RedoPageBreaks
æD PROCEDURE TPrintHandler.RedoPageBreaks;
æFi UMacApp.p
æT METHOD
æC RedoPageBreaks recalculates the locations of page breaks in the TPrintHandler
object’s associated view. MacApp calls RedoPageBreaks from TView.DoPagination.
The default version is an empty method. TPrintHandler subclasses must override
this method to provide useful behavior. You usually do not need to call this
method yourself, although you can call it when you want to ensure that the view’s
page breaks are correct.
æKY TPrintHandler.Reset
æD PROCEDURE TPrintHandler.Reset;
æFi UMacApp.p
æT METHOD
æC Reset changes the state of the print handler to use its default values. MacApp
calls Reset from methods that restore the TPrintHandler object’s default
settings. The default version is an empty method. TPrintHandler subclasses must
override this method to provide useful behavior.
æKY TPrintHandler.SetDefaultPrintInfo
æD PROCEDURE TPrintHandler.SetDefaultPrintInfo;
æFi UMacApp.p
æT METHOD
æC SetDefaultPrintInfo sets the default values for the TPrintHandler object’s
fields. MacApp calls SetDefaultPrintInfo from methods that establish a default state
for the TPrintHandler object, such as IPrintHandler. The default version is an
empty method. TPrintHandler subclasses must override this method to provide
useful behavior.
æKY TPrintHandler.SetPageInterior
æD PROCEDURE TPrintHandler.SetPageInterior(pageNumber: INTEGER);
æFi UMacApp.p
æT METHOD
æC SetPageInterior creates the margin around the image that is to be printed. The
image is the portion of the TPrintHandler object’s associated view that will be
printed. The pageNumber parameter specifies the page of the view that is to be
printed. MacApp calls SetPageInterior when it creates the page image that it
will send to the printer. You usually do not need to call this method yourself.
The default version of SetPageInterior is an empty method. TPrintHandler
subclasses must override this method to provide useful behavior.
æKY TPrintHandler.SetPageOffset
æD PROCEDURE TPrintHandler.SetPageOffset(coord: VPoint);
æFi UMacApp.p
æT METHOD
æC SetPageOffset sets the value of the global variable gPageOffset to the specified
value. The value of gPageOffset defines the top=left corner, in view
coordinates, of a page to be printed from the TPrintHandler object’s associated view.
The coord parameter is the view point that will become the top-left corner of the
page. MacApp calls SetPageOffset from TView.DoSetPageOffset when the view is
about to be printed. You usually do not need to call this method yourself. The
default version of SetPageOffset is an empty method. TPrintHandler subclasses
must override this method to provide useful behavior.
æKY TPrintHandler.SetupForFinder
æD FUNCTION TPrintHandler.SetupForFinder: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC SetupForFinder sets up the TPrintHandler object for printing from the Finder.
MacApp calls SetupForFinder when the user has selected a document created by the
TApplication object and then chosen the Print command from the Finder’s File
menu. You usually do not need to call this method yourself. The default version
of SetupForFinder causes a WriteLn with an error message in debug mode.
TPrintHandler subclasses must override this method to provide useful behavior.
æKY TPrintStyleChangeCommand.DoIt
æD PROCEDURE TPrintStyleChangeCommand.DoIt; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC DoIt looks for changes to the Page Setup dialog box and writes the changes to a
new copy of the print record. MacApp calls this method when the user makes
changes in the Page Setup dialog box. You usually do not need to call DoIt
yourself, although you can call it from the RedoIt method.
æKY TPrintStyleChangeCommand.Fields
æD PROCEDURE TPrintStyleChangeCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Fields reports the contents of each field of the TPrintStyleChangeCommand object
to the MacApp Inspector. DoToField is a procedure that MacApp passes to Fields
to report the contents of each field. Fields iterates over all the fields of
the TPrintStyleChangeCommand object, performing DoToField on each one. The
fieldName parameter is the name of the field. The fieldAddr parameter is the field’s
location in memory. The fieldType parameter uses a predefined constant to tell
Fields what type of information to look for in a field. MacApp calls Fields
from the MacApp Inspector. You must override this method in your subclasses if
you want the Inspector to display your fields. Your override must call INHERITED
Fields as its last action to ensure that the inherited fields are also
displayed.
æKY TPrintStyleChangeCommand.Free
æD PROCEDURE TPrintStyleChangeCommand.Free; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Free releases the memory used by both the old and new print records and then
calls INHERITED Free. MacApp calls Free when the user chooses the Page Setup
dialog box but does not make a change to the settings in the box. Free is also
called by TApplication.PerformCommand after the command has been handled.
TApplication.CommitLastCommand also calls it after the user chooses another complex
command . (In MacApp, a “complex command” is one that changes the document and can
be undone, or one that requires mouse tracking.) You never need to call this
method yourself.
æKY TPrintStyleChangeCommand.IPrintStyleChangeCommand
æD PROCEDURE TPrintStyleChangeCommand.IPrintStyleChangeCommand
(itsPrintHandler TStdPrintHandler);
æFi UPrinting.p
æT METHOD
æC IPrintStyleChangeCommand makes a copy of the existing print record for
TPrintStyleChangeCommand.DoIt to alter when creating the new print record; it also
keeps the original print record for TPrintStyleChangeCommand.UndoIt to use in
restoring the state of the Page Setup dialog box. The parameter itsPrintHandler is
the object of class TStdPrintHandler that prints a particular view or document.
MacApp calls IPrintStyleChangeCommand when the user chooses the Page Setup
commandk . You never need to call this method yourself.
æKY TPrintStyleChangeCommand.RedoIt
æD PROCEDURE TPrintStyleChangeCommand.RedoIt; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC The RedoIt method redoes page setup changes by writing a copy of the changed
print record into the new print record. MacApp calls this method when the user
selects the Redo menu item to redo changes in the Page Setup dialog box. You never
need to call RedoIt yourself.
æKY TPrintStyleChangeCommand.UndoIt
æD PROCEDURE TPrintStyleChangeCommand.UndoIt; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC The UndoIt method undoes page setup changes by writing a copy of the old print
record into the new print record. MacApp calls this method when the user selects
the Undo menu item to undo changes in the Page Setup dialog box. You never
need to call UndoIt yourself.
æKY TPtrBasedDoublyLinkedList.AppendNode
æD PROCEDURE TPtrBasedDoublyLinkedList.AppendNode
(thisNode: UNIV PtrBasedDoublyLinkedListNodePtr);
æFi UList.p
æT METHOD
æC AppendNode adds a new node to the list of pointers. The thisNode parameter
identifies the node to be added. TDynamicArray.EachElementDoTil calls AppendNode to
add a node to the dynamic array. You never need to call this method.
æKY TPtrBasedDoublyLinkedList.EachNodeDo
æD PROCEDURE TPtrBasedDoublyLinkedList.EachNodeDo(PROCEDURE DoToNode
(thisNode: UNIV PtrBasedDoublyLinkedListNodePtr));
æFi UList.p
æT METHOD
æC EachNodeDo calls DoToNode for each node in the list. The thisNode parameter
identifies the node that is currently being iterated.
TDynamicArray.DeleteElementsAt and TDynamicArray.InsertElementsBefore call EachNodeDo.
You never need to call this method.
æKY TPtrBasedDoublyLinkedList.Fields
æD PROCEDURE TPtrBasedDoublyLinkedList.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: integer)); OVERRIDE;
æFi UList.p
æT METHOD
æC Fields iterates over all the fields of the TPtrBasedDoublyLinkedList object,
performing DoToField on each one.
DoToField is a procedure that MacApp passes to Fields to report the contents of
each field. The fieldName parameter is the name of the field. The fieldAddr parameter
is the field’s location in memory. The fieldType parameter uses a predefined constant
to tell Fields what type of information to look for in a field.
MacApp calls Fields from the MacApp Inspector. You must override this method in
your subclasses if you want the Inspector to display your fields. Your override must
call INHERITED Fields as its last action to ensure that the inherited fields are also
displayed.
æKY TPtrBasedDoublyLinkedList.IPtrBasedDoublyLinkedList
æD PROCEDURE TPtrBasedDoublyLinkedList.IPtrBasedDoublyLinkedList;
æFi UList.p
æT METHOD
æC IPtrBasedDoublyLinkedList initializes a new linked list.
TDynamicArray.IDynamicArray calls IPtrBasedDoublyLinkedList to initialize the linked
list. You never need to call this method.
æKY TPtrBasedDoublyLinkedList.RemoveNode
æD PROCEDURE TPtrBasedDoublyLinkedList.RemoveNode
(thisNode: UNIV PtrBasedDoublyLinkedListNodePtr);
æFi UList.p
æT METHOD
æC RemoveNode removes a node from the list of pointers. The thisNode parameter
identifies the node to be removed. TDynamicArray.EachElementDoTil calls RemoveNode
to remove the node. You never need to call this method.
æKY TQuitCommand.DoIt
æD PROCEDURE TQuitCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt closes the application. The command object is created by
TApplication.DoMenuCommand and is intended to endure for the entire lifetime
of the application.
MacApp calls this method when the user chooses the Quit item from the File menu.
You never need to call this method yourself.
æKY TQuitCommand.Fields
æD PROCEDURE TQuitCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TQuitCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TQuitCommand object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TQuitCommand.IQuitCommand
æD PROCEDURE TQuitCommand.IQuitCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IQuitCommand initializes a TQuitCommand object and associates it with a command
number. The itsCmdNumber parameter is the command number that is associated
with a particular menu command—in this case, the Quit command normally found in an
application's File menu. MacApp calls this method when it creates the
TQuitCommand object in TApplication.DoMenuCommand. You never need to call IQuitCommand
yourself.
æKY TRadio.DoChoice
æD PROCEDURE TRadio.DoChoice(origView: TView; itsChoice: INTEGER);
æFi UDialog.p
æT METHOD
æC DoChoice toggles the radio button and sends the mRadioHit message to its
superview if the radio button is off and the itsChoice parameter is equal to
mRadioHit. DoChoice then calls INHERITED DoChoice. The origView parameter is the
original view that received the mRadioHit message. The itsChoice parameter is an
integer that tells whether the user clicked a button, a check box, a text string, or
another control. DoChoice is called when the user clicks the mouse in a
control’s active area; methods that call TRadio.DoChoice are TCtlMgr.DoMouseCommand
and TControl.TrackMouse.
æKY TRadio.Fields
æD PROCEDURE TRadio.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TRadio object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TRadio object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TRadio.IRadio
æD PROCEDURE TRadio.IRadio(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsLabel: Str255; isTurnedOn: BOOLEAN);
æFi UDialog.p
æT METHOD
æC IRadio initializes a TRadio object and associates it with a superview. The
itsSuperView parameter is the view containing the radio button. The itsLocation
parameter is the location, in view coordinates, of the radio button . The itsSize
parameter is the size of the control, expressed in pixels. The itsHSizeDet and
itsVSizeDet parameters determine how the view’s horizontal and vertical
dimensions are calculated, respectively. Possible values are: sizeSuperView (subview
is the same size as superview), sizeRelSuperView (subview size changes an equal
amount relative to the superview's size), sizePage (view is the size of one
page), sizeFillPages (view expands to fill an exact number of pages), sizeVariable
(view size fluctuates according to application-specific criteria), and
sizeFixed (no special handling of size issues). The itsLabel parameter is the string
that is the button's label. If the value of isTurnedOn is TRUE, the control is
initialized to be on. You can use IRadio to initialize TRadio objects that are
created procedurally.
æKY TRadio.IRes
æD PROCEDURE TRadio.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TRadio object from a 'view' resource template. The fDefChoice
field is set to mRadioHit. The itsDocument parameter specifies the document
affected by the radio button’s action. The itsSuperView parameter specifies the
view in which the control appears; for a TRadio object, this is usually a
TCluster or TDialogView object. The itsParams parameter is a pointer to the portion
of the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view'
resource template, usually in response to a NewTemplateWindow or a DoCreateViews
call. You never need to call IRes yourself.
æKY TRadio.IsOn
æD FUNCTION TRadio.IsOn: BOOLEAN;
æFi UDialog.p
æT METHOD
æC IsOn returns TRUE if the radio button is highlighted. IsOn is called when a
method needs to check the current status of a radio button; you can use this method
in a similar fashion. Methods that call IsOn are: TRadio.DoChoice,
TCluster.ReportCurrent, TRadio.Toggle, TRadio.ToggleIf, and TRadio.WRes.
æKY TRadio.SetState
æD PROCEDURE TRadio.SetState(state, redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method turns the radio button on or off, depending on the value of the
state parameter, and redraws the radio button if requested. The value of the state
parameter sets the control's appearance; setting state to 1 fills a check box
or radio button with the appropriate mark; setting state to 0 clears it. If the
value of the redraw parameter is TRUE, the control is immediately redrawn with
the current value; otherwise, it is not, even though the new value may affect
its appearance. You can set redraw to FALSE when you know the control will
eventually be redrawn and you want to avoid drawing it twice, which makes the screen
appear to flicker. SetState is called by TRadio.IRadio when initializing a
TRadio object. It is also called by TCluster.DoChoice to set a user selection in a
cluster of radio buttons. You can call it to set the state of a TRadio
control, whether it is a single object or a member of a cluster of radio buttons.
æKY TRadio.Toggle
æD PROCEDURE TRadio.Toggle(redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method acts as a toggle, turning the radio button on or off. If the value
of the redraw parameter is TRUE, the control is immediately redrawn with the
current value; otherwise, it is not, even though the new value may affect its
appearance. You can set redraw to FALSE when you know the control will eventually
be redrawn and you want to avoid drawing it twice, which makes the screen appear
to flicker. Toggle is called by TRadio.DoChoice to toggle the value of a
TRadio object when the user clicks on it. You can call this method to change the
state of the radio button.
æKY TRadio.ToggleIf
æD PROCEDURE TRadio.ToggleIf(matchState, redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC ToggleIf changes the state of a TRadio button if the control's current state
equals the value of the matchState parameter. If the matchState parameter is TRUE,
the control must be on to be toggled. If matchState is FALSE, the control must
be off to be toggled. If the value of the redraw parameter is TRUE, the
control is redrawn with the current value; otherwise, it is not, even though the new
value may affect its appearance. You can set redraw to FALSE when you know the
control will eventually be redrawn and you want to avoid drawing it twice,
which makes the screen appear to flicker.
æKY TRadio.WRes
æD PROCEDURE TRadio.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TRadio portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the TRadio
section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are active
on the screen. You rarely need to call this method yourself. You must override
this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the end of
the previously-written resource data; if there is not enough space to write
your data into the file, your override should call the global routine ExpandPtr,
passing as arguments the current values of theResource, itsParams, and the size
of your resource data, in bytes. ExpandPtr expands the 'view' resource handle
by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater. You
need not be concerned about making the 'view' resource handle too big, because
MacApp reclaims unused space by returning a new value for itsParams when the
WRes method completes.
æKY TRadio.WriteRes
æD PROCEDURE TRadio.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('radb') and
class name ('TRadio') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the view’s
resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a TRadio
object as part of a 'view' resource; you can use it in a similar fashion. You
can override this method to provide your own unique class name or signature.
æKY TRCSelectCommand.ComputeNewSelection
æD PROCEDURE TRCSelectCommand.ComputeNewSelection(VAR clickedCell: GridCell); OVERRIDE;
æFi UGridView.p
æT METHOD
æC ComputeNewSelection recalculates the current selection in the TRCSelectCommand’s
associated TGridView object. If the mouse click occurred under the right
conditions for a multiple selection then the specified cell is added to the current
selection; otherwise, it becomes the new selection. The clickedCell parameter
specifies the grid cell that the user clicked. MacApp calls ComputeNewSelection
when the user clicks a TGridView object. You do not need to call this method
yourself unless you override TGridView methods to implement other forms of
selection.
æKY TRCSelectCommand.Fields
æD PROCEDURE TRCSelectCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TRCSelectCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TRCSelectCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TRCSelectCommand.TrackMouse
æD FUNCTION TRCSelectCommand.TrackMouse(aTrackPhase: TrackPhase; VAR anchorPoint,
previousPoint, nextPoint: VPoint; mouseDidMove: BOOLEAN): TCommand; OVERRIDE;
æFi UGridView.p
æT METHOD
æC TrackMouse tracks the mouse and sets the selection when the user selects an
entire row of cells in a TGridView view. In general, this method allows you to
carry out any actions (other than feedback or mouse constraint) that depend on the
movement of the mouse or on the track phase. TrackMouse returns the mouse
tracker that will be used in subsequent calls. Although applications may sometimes
return a different mouse-tracker object, TrackMouse usually returns SELF. The
aTrackPhase parameter describes the current phase of the mouse-tracking process.
MacApp sets its value to trackPress when the mouse button is first pressed.
When the mouse has moved more than the hysteresis value since the last time
TrackFeedback was called, MacApp sets the value of the aTrackPhase parameter to
trackMove. When the mouse button is released, MacApp sets aTrackPhase to
trackRelease. When aTrackPhase is set to trackPress, all three points (anchorPoint,
previousPoint, and nextPoint) have the same value. When aTrackPhase is set to
trackRelease, the nextPoint parameter contains the coordinates of the location of the
mouse-up event. The anchorPoint parameter is the position of the mouse pointer,
in view coordinates, when the mouse button was first pressed. If you change
this value, the new value is passed to you in the parameter aTrackPhase the next
time TrackMouse is called. The previousPoint parameter is the position, in view
coordinates, of the mouse pointer the last time TrackMouse was called. The
nextPoint parameter is the current position of the mouse pointer, in view
coordinates. Although you can change the value of nextPoint yourself, it is preferable
to use TCommand.TrackConstrain to limit mouse movement. The value of nextPoint
at the time TrackMouse exits will be passed to you as the value of
previousPoint the next time TrackMouse is called. MacApp sets the value of the
mouseDidMove
parameter to TRUE if the mouse moved since the last time
TCommand.TrackFeedback was called. However, SELF.TrackConstrain may set the mouse
coordinates back
to values as if no movement had occurred; thus, the mouse has not necessarily
moved the first time TrackMouse is called with aTrackPhase set to trackMove. Test
the value of mouseDidMove to determine whether you should consider the mouse
to have moved. The mouseDidMove parameter will have the value TRUE if
aTrackPhase has a value of either trackPress or trackRelease; otherwise, its value is
TRUE if nextPoint and previousPoint are not equal. You never call
TRCSelectCommand.TrackMouse yourself; rather, TApplication.TrackMouse calls it
when the mouse button is first pressed, as the mouse moves, and when the mouse
button is released. You often override this method to take application-specific action.
(For further information on mouse trackers, see the discussion of mouse operations in
the MacApp 2.0 Cookbook.)
æKY TRevertDocCommand.DoIt
æD PROCEDURE TRevertDocCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt puts up the standard Revert dialog box. If the user answers yes, the method
then calls fChangedDocument.Revert to do the actual work of changing the
document currently in memory to match the last version saved on disk. The
fChangedDocument.Revert method reads the disk file, updates the current screen display,
resets the associated print handlers, and frees unused memory.
TRevertDocCommand.DoIt then calls fChangedDocument.ShowReverted to show the document.
MacApp calls this method when the user chooses the Revert item from the application's
File menu. You never need to call DoIt yourself.
æKY TRevertDocCommand.Fields
æD PROCEDURE TRevertDocCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TRevertDocCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TRevertDocCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TRevertDocCommand.IRevertDocCommand
æD PROCEDURE TRevertDocCommand.IRevertDocCommand(itsCmdNumber: CmdNumber;
itsDocument: TDocument);
æFi UMacApp.p
æT METHOD
æC IRevertDocCommand initializes a TRevertDocCommand object and associates it with
a command number and a document. The itsCmdNumber parameter is the command
number that is associated with a particular menu command — in this case, the Revert
command normally found in an application’s File menu. IRevertDocCommand is
called by TDocument.DoMenuCommand when the user chooses the Revert item from the
File menu. You never need to call it yourself.
æKY TRowSelectCommand.ComputeAnchorCell
æD PROCEDURE TRowSelectCommand.ComputeAnchorCell(VAR clickedCell: GridCell); OVERRIDE;
æFi UGridView.p
æT METHOD
æC ComputeAnchorCell sets the value of fAnchorCell to be the first cell in a row of
cells in a TGridView object. The clickedCell parameter is used internally by
TCellSelectCommand.ComputeAnchorCell; TRowSelectCommand.ComputeAnchorCell
accomplishes most of its task by calling this inherited method. ComputeAnchorCell is
called by TRCSelectCommand.TrackMouse when the user first selects a row of
cells in a TGridView object. You usually do not need to call this method yourself
unless you override TGridView methods to implement other forms of selection.
æKY TRowSelectCommand.ComputeNewSelection
æD PROCEDURE TRowSelectCommand.ComputeNewSelection
(VAR clickedCell: GridCell); OVERRIDE;
æFi UGridView.p
æT METHOD
æC ComputeNewSelection specifies the cell the user clicked in and calls INHERITED
ComputeNewSelection to compute the new value of the selection. The clickedCell
parameter specifies the cell the user clicked in by returning the last cell in
the selected row. ComputeNewSelection is called repeatedly by
TRCSelectCommand.TrackMouse
as the user moves the mouse to select one or more rows of cells in a
TGridView object. You usually do not need to call this method yourself unless
you override TGridView methods to implement other forms of selection.
æKY TRowSelectCommand.Fields
æD PROCEDURE TRowSelectCommand.Fields(PROCEDURE DoToField (fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TRowSelectCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TRowSelectCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TRowSelectCommand.IRowSelectCommand
æD PROCEDURE TRowSelectCommand.IRowSelectCommand(itsView: TGridView;
theShiftKey, theCmdKey: BOOLEAN);
æFi UGridView.p
æT METHOD
æC IRowSelectCommand initializes a command object and associates it with a
TGridView instance. The itsView parameter is the TGridView associated with the command
object. MacApp sets the parameter theShiftKey to TRUE while the Shift key is
pressed. MacApp sets the parameter theCmdKey to TRUE while the Command key is
pressed.
æKY TRunArray.DeleteItems
æD PROCEDURE TRunArray.DeleteItems(firstItem, noOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC DeleteItems deletes the indicated items from the run array. The firstItem
parameter is the first item to be deleted. The noOfItems parameter is the number of
items to be deleted. MacApp calls this method from other methods that adjust the
height, width, or number of rows or columns in a TGridView object. You usually
do not need to call DeleteItems.
æKY TRunArray.Fields
æD PROCEDURE TRunArray.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TRunArray object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TRunArray
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TRunArray.FindChunk
æD FUNCTION TRunArray.FindChunk(item: INTEGER; VAR chunk, indexInChunk: INTEGER;
VAR theTotal: LONGINT): BOOLEAN;
æFi UGridView.p
æT METHOD
æC FindChunk returns information about a given item in the run array. The item
parameter is the index of the specified item; TRunArray items are numbered from 1.
The chunk parameter indicates the chunk in which the item is located, where
zero is the first chunk in the TRunArray object. The indexInChunk parameter is the
location of the item within the chunk. Note that the first item in the chunk
is at location 1. The parameter theTotal is the sum of values up to, but not
including, the chunk in which the given item is located. FindChunk returns FALSE
if the given item is outside the range of items in the run array (that is, if
the value of item is less than 1 or the value of item is greater than the value
of fNoOfItems), or if the given item is not represented in a chunk.
æKY TRunArray.FindItem
æD FUNCTION TRunArray.FindItem(theTotal: LONGINT): INTEGER;
æFi UGridView.p
æT METHOD
æC FindItem returns the item number of the item for which the sum of the values
exceeds the specified value, or returns 0 if the specified value is outside the
range from 0 to the sum of values represented by the run array. The parameter
theTotal is the number used as a total to find a matching item. MacApp calls
FindItem from methods that convert from view points to cells in a TGridView object.
You usually do not need to call FindItem yourself.
æKY TRunArray.Free
æD PROCEDURE TRunArray.Free; OVERRIDE;
æFi UGridView.p
æT METHOD
æC Free releases the memory used by the TRunArray object and its component objects.
MacApp calls this method in the normal process of freeing objects. You can
call Free to release the memory used by a TRunArray object when you no longer need
that object.
æKY TRunArray.GetValue
æD FUNCTION TRunArray.GetValue(item: INTEGER): INTEGER;
æFi UGridView.p
æT METHOD
æC GetValue returns the value associated with the specified item in the TRunArray
object. The item parameter is the index of the specified item; TRunArray items
are numbered from 1. MacApp calls GetValue from a variety of methods that use
the values stored in a TRunArray object. You usually do not need to call GetValue
yourself.
æKY TRunArray.InsertItems
æD PROCEDURE TRunArray.InsertItems(firstItem, noOfItems, value: INTEGER);
æFi UGridView.p
æT METHOD
æC InsertItems inserts the specified number of items into the TRunArray object, all
with the given value. The firstItem parameter is the index of the first item
to be inserted. The noOfItems parameter is the number of items that are to be
inserted. The value parameter is the value that will be associated with all the
newly inserted items.
æKY TRunArray.IRunArray
æD PROCEDURE TRunArray.IRunArray;
æFi UGridView.p
æT METHOD
æC IRunArray initializes a run array to have no items. MacApp calls IRunArray when
it creates a new TRunArray object. You usually do not need to call this method
yourself.
æKY TRunArray.SumValues
æD FUNCTION TRunArray.SumValues(firstItem, noOfItems: INTEGER): LONGINT;
æFi UGridView.p
æT METHOD
æC SumValues returns the sum of the values of the specified items. The firstItem
parameter is the index of the first item to be included in the summation. The
noOfItems parameter is the number of items whose values are to be added. MacApp
calls SumValues from a variety of methods that convert from cells to values of
other data types. You usually do not need to call SumValues yourself.
æKY TSaveDocCommand.DoIt
æD PROCEDURE TSaveDocCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt calls fChangedDocument.Save to do the actual work of saving the document or
a copy to disk. MacApp calls this method when the user chooses the Save or
Save As item from the application's File menu. You never need to call DoIt
yourself.
æKY TSaveDocCommand.Fields
æD PROCEDURE TSaveDocCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TSaveDocCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TSaveDocCommand object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what type
of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TSaveDocCommand.ISaveDocCommand
æD PROCEDURE TSaveDocCommand.ISaveDocCommand(itsCmdNumber: CmdNumber;
itsDocument: TDocument);
æFi UMacApp.p
æT METHOD
æC ISaveDocCommand initializes a TSaveDocCommand object and associates it with a
command number and a document. The itsCmdNumber parameter is the command number
that is associated with a particular menu command—in this case, the Save, Save
As, or Save a Copy command typically found in an application's File menu. The
itsDocument parameter is the document associated with the command object. MacApp
calls this method when the user chooses the Save or Save as item from the File
menu. You never need to call this method yourself.
æKY TScrollBar.ActionProc
æD PROCEDURE TScrollBar.ActionProc(partCode: INTEGER);
æFi UMacApp.p
æT METHOD
æC ActionProc is called by the MacApp global routine ActionProcForTScrollBar in
response to a mouse event in a scroll bar's active area. The partCode parameter
identifies the part of the scroll bar that the user clicked. You will not need to
call this method. You can override this method to implement nonstandard
scrolling behavior.
æKY TScrollBar.DeltaValue
æD PROCEDURE TScrollBar.DeltaValue(delta: VCoordinate);
æFi UMacApp.p
æT METHOD
æC DeltaValue ensures that the value of the delta parameter is within the scroll
bar’s minimum and maximum values. DeltaValue then offsets the current value of
the scroll bar by the value of the delta parameter. The delta parameter is the
amount, in view coordinates, by which the scroll bar is offset. DeltaValue is
called by TScroller.DoKeyCommand when the user presses the page up, page down,
home, or end keys. TScroller.ScrollBy calls TScrollBar.DeltaValue when
automatically scrolling a view. TScrollBar.TrackScrollBar and
TSScrollBar.TrackScrollBar call TScrollBar.DeltaValue when the mouse pointer is being
tracked in a scroll bar. You usually do not need to call this method.
æKY TScrollBar.DoMouseCommand
æD PROCEDURE TScrollBar.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMouseCommand differentiates between tracking the mouse when the pointer is in
the scroll box (sometimes called the thumb) and tracking the mouse when the
pointer is in any other part of the scroll bar. When tracking the pointer in the
scroll box, this method calls the Control Manager routine TrackControl and sets
the scroll bar’s new value to reflect the final position of the scroll box.
When tracking the mouse in scroll arrows and page areas, DoMouseCommand calls
TrackControl with an action procedure that calls the scroll bar’s TrackScrollBar
method. Unlike many DoMouseCommand methods, this method never returns a command
object; it always handles commands directly and returns NIL. The parameter
theMouse is the mouse pointer’s current location, described in view coordinates. The
info parameter is the event record of the mouse-down event that caused
DoMouseCommand to be called. The hysteresis parameter is a point that represents the
horizontal and vertical distance the mouse can travel between clicks and still
be considered to be at the same location. MacApp uses this parameter to
determine whether a double click has occurred or if a control has moved.
DoMouseCommand is called when MacApp receives a mouse-down event in a TScrollBar
object. You usually do not need to call this method yourself.
æKY TScrollBar.Fields
æD PROCEDURE TScrollBar.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TScrollBar object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TScrollBar
object, performing DoToField on each one. The fieldName parameter is the name
of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TScrollBar.IRes
æD PROCEDURE TScrollBar.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC IRes initializes a TScrollBar object from a 'view' resource template. The
fDefChoice field is set to mVScrollBarHit or mHScrollBarHit, according to whether the
control area’s vertical or horizontal dimension is greater. The itsDocument
parameter specifies the document affected by the scroll bar’s action. The
itsSuperView parameter specifies the view in which the scroll bar appears. The
itsParams parameter is a pointer to the portion of the 'view' resource data used to
initialize this view. When the IRes method finishes initializing the view, the
method moves the pointer to the end of this data. MacApp calls this method for
each of the views created from a 'view' resource template, usually in response to
a NewTemplateWindow or a DoCreateViews call. You never need to call IRes
yourself.
æKY TScrollBar.IScrollBar
æD PROCEDURE TScrollBar.IScrollBar(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsDirection: VHSelect;
itsVal, itsMin, itsMax: VCoordinate);
æFi UMacApp.p
æT METHOD
æC IScrollBar initializes a TScrollBar object and associates it with a superview.
The itsSuperView parameter is the view containing the scroll bar. The
itsLocation parameter is the location, expressed in view coordinates, of the scroll
bar. The itsSize parameter is the scroll bar size, expressed in pixels. The
itsHSizeDet and itsVSizeDet parameters determine how the view’s horizontal and
vertical dimensions are calculated, respectively. Possible values are: sizeSuperView
(subview is the same size as superview), sizeRelSuperView (subview size changes
an equal amount relative to the superview's size), sizePage (view is the size of
one page), sizeFillPages (view expands to fill an exact number of pages),
sizeVariable (view size fluctuates according to application-specific criteria), and
sizeFixed (no special handling of size issues). The itsDirection parameter is
the direction in which the control is offset. The itsVal parameter is the
current value of the control, which will be adjusted to be in the range of itsMin to
itsMax. The itsMin and itsMax parameter specify the minimum and maximum values
that the control can have. You call IScrollBar to initialize scroll bars
procedurally.
æKY TScrollBar.TrackScrollBar
æD PROCEDURE TScrollBar.TrackScrollBar(partCode: INTEGER);
æFi UMacApp.p
æT METHOD
æC TrackScrollBar tells its caller which way to offset the value of the scroll bar.
If the mouse is clicked while the pointer is in the scroll bar's page up area
or up arrow, partCode has the value inPageUp or inUpButton, respectively, and
TrackScrollBar sets the DeltaValue parameter to -1. Otherwise, it sets
DeltaValue to 1. You can override this method if you want an action to take place
while you are tracking the scroll bar’s arrows or page areas. Typically the action
taken is to change the scroll bar’s value appropriately. TrackScrollBar is called
by TScrollbar.ActionProc in response to a mouse event in a scroll bar's active
area. TScroller.TrackScrollBar may also be called in similar circumstances by
TSScrollBar.TrackScrollBar. You never need to call TrackScrollBar yourself
unless you change the way MacApp implements scroll bars.
æKY TScrollBar.WRes
æD PROCEDURE TScrollBar.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WRes writes the TScrollBar portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TScrollBar section of the view’s resource template. WRes is the inverse of the
IRes method, and is used only by programs that write 'view' resources; for
example, ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources.
Your override should check the size of the space remaining in the template past
the end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and
the size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams
when the WRes method completes.
æKY TScrollBar.WriteRes
æD PROCEDURE TScrollBar.WriteRes (theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes: it sets up the signature ('sbar') and
class name ('TScrollBar') for the 'view' resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TScrollBar object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TScroller.AddSubview
æD PROCEDURE TScroller.AddSubView(theSubView: TView); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC AddSubView calls INHERITED AddSubView and then notifies the subview that it’s in
a scroller by calling theSubView.BeInScroller(SELF). The parameter theSubview
is the subview to be added to the scroller. MacApp calls AddSubView when
installing subviews in windows and dialog boxes. You can call AddSubview to associate
a view with a scroller. You usually do not need to override AddSubView.
æKY TScroller.AdjustScrollBars
æD PROCEDURE TScroller.AdjustScrollBars(invalidate: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC AdjustScrollBars moves and resizes the scroll bars appropriately. The invalidate
parameter specifies whether MacApp should force the scroll bars to redraw
themselves; if invalidate is set to TRUE then the scroll bars are redrawn. MacApp
calls AdjustScrollBars from the TScroller methods Locate and Resize when a
scroller moves or changes size. You usually do not need to call this method
yourself. You can override AdjustScrollBars for scrollers whose scroll bars don’t
depend on the scroller’s location or size.
æKY TScroller.AutoScroll
æD PROCEDURE TScroller.AutoScroll(viewPt: VPoint; VAR delta: VPoint);
æFi UMacApp.p
æT METHOD
æC AutoScroll implements proportional automatic scrolling (that is, how far the
view is scrolled depends on how fast the user moves the mouse), and returns the
number of pixels to be scrolled during automatic scrolling. The viewPt parameter
is the location of the mouse described in view coordinates. The delta parameter
returns the number of pixels to scroll in the horizontal and vertical
directions. It is computed by determining where viewPt is in relation to the scroller.
If viewPt is “above” the scroller (that is, viewPt.v < extent.top), then
delta.v is set to scroll the contents of the scroller down. If viewPt is “below” the
scroller, then delta.v is set to scroll the contents of the scroller up. The
delta.h parameter is set similarly. The number of pixels to scroll is determined
by the scroller’s fScrollUnit values.
AutoScroll is called by TApplication.TrackMouse when the mouse is being tracked and
has strayed outside of a scroller. Because MacApp tracks the mouse and sends messages
to scrollers for you, you rarely need to call AutoScroll yourself. You rarely override
this method; you might do so to implement a different means of determining the value
of delta.
æKY TScroller.CreateScrollBar
æD PROCEDURE TScroller.CreateScrollBar(itsDirection: VHSelect);
æFi UMacApp.p
æT METHOD
æC CreateScrollBar creates a TSScrollBar object associated with the TScroller
object. The itsDirection parameter specifies the orientation of the TSScrollBar
object; a value of v specifies vertical and a value of h specifies horizontal.
MacApp calls CreateScrollBar from TScroller.IScroller to associate a scroller with
its scroll bars. You can use it to create scroll bars that communicate with an
installed scroller to provide standard scrolling behavior. You usually do not
need to override CreateScrollBar.
æKY TScroller.CreateTemplateScrollBar
æD PROCEDURE TScroller.CreateTemplateScrollBar(itsDirection: VHSelect);
æFi UMacApp.p
æT METHOD
æC CreateTemplateScrollBar creates a TSScrollBar object with the specified
orientation from a standard resource template provided with MacApp. The itsDirection
parameter specifies the orientation of the TSScrollBar object; a value of v
specifies vertical, and a value of h specifies horizontal. You can use
CreateTemplateScrollBar to create a scroll bar with standard behavior associated with
the TScroller object.
æKY TScroller.DoKeyCommand
æD FUNCTION TScroller.DoKeyCommand(ch: CHAR; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoKeyCommand handles keystrokes made without the Command key pressed, when the
TScroller object is the active view. The default version automatically handles
scrolling behavior appropriate to the Page Up, Page Down, Home, and End keys on
the Apple® Extended keyboard. If the method cannot handle the keystroke, it
calls INHERITED DoKeyCommand. The ch parameter is the alphanumeric character that
corresponds to the key the user pressed. The aKeyCode parameter is the ASCII
key code generated by the keystroke. The info parameter is the event record
description of the event that caused MacApp to call DoKeyCommand; the info parameter
is used to pass information about the event, such as whether the Option key
was pressed. MacApp calls DoKeyCommand in response to a keyboard event that
occurs when the TScroller object is the active view. You usually do not need to call
this method yourself. You must override this method in your TScroller
subclasses if you want to provide specialized scrolling behavior in response to
keyboard events.
æKY TScroller.DoScroll
æD PROCEDURE TScroller.DoScroll(delta: VPoint; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DoScroll changes the scroller’s translation value by the delta amount. If the
redraw parameter is TRUE, then ScrollDraw is called to carry out the scroll
graphically. MacApp calls DoScroll from various TScroller methods to change the
scroller's translation amount. You usually do not need to call this method.
æKY TScroller.Fields
æD PROCEDURE TScroller.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TScroller object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TScroller
object, performing DoToField on each one. The fieldName parameter is the name of
the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TScroller.Focus
æD FUNCTION TScroller.Focus: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC This method calls INHERITED Focus and sets the global variable gLongOffset to
equal the value in fTranslation. MacApp calls Focus prior to performing any
graphics operation on a view. You usually do not need to call this method yourself
unless you change the way scrollers are implemented in MacApp. For similar
reasons, you usually do not need to override this method.
æKY TScroller.ForceRedraw
æD PROCEDURE TScroller.ForceRedraw; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC ForceRedraw invalidates the entire scroller view and the scroll bars. MacApp
calls ForceRedraw to mark an entire view to be redrawn.
æKY TScroller.Free
æD PROCEDURE TScroller.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free releases the memory used by the scroll bars referenced in fScrollBars and
then calls INHERITED Free to release the memory used by the TScroller object and
its dependent structures. MacApp calls Free when disposing of a scroller; it
also calls Free from TScroller.CreateScrollBar if the creation of the scroll
bars fails. You can call this method to dispose of a TScroller object; however,
you usually do not need to do so yourself because MacApp calls Free when
disposing of the window or the last view associated with the scroller. You usually do
not need to override this method unless you have changed the way MacApp
associates scrollers with views.
æKY TScroller.GetExtent
æD PROCEDURE TScroller.GetExtent(VAR itsExtent: VRect); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetExtent returns the scroller’s dimensions translated according to the
translation values. The itsExtent parameter returns the dimensions, which is the
extent returned by INHERITED GetExtent offset by the value of fTranslation. MacApp
calls GetExtent when it needs to know the boundaries of a view for various
reasons—for example, to determine if a mouse click ocurred in that view, to draw a
specific area of the screen, to print a selection, or to automatically scroll a
particular area onto the screen. Methods that call GetExtent include
TApplication.TrackMouse, and the TScroller methods AutoScroll, RevealRect, and
ScrollDraw. You can call this method to obtain the boundaries of a view described
as a rectangle in view coordinates.
æKY TScroller.GetScroller
æD FUNCTION TScroller.GetScroller(immediateSuperView: BOOLEAN): TScroller; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetScroller simply returns SELF. The immediateSuperView parameter is set to TRUE
if the scroller is to be returned only when it is this view's immediate
superview. The parameter is set to FALSE if it doesn't matter whether the scroller is
the immediate superview of this view. TView.GetScroller calls TScroller.GetScroller
when the TView version is trying to find its scroller. You usually call
GetScroller when you are a initializing a tracker command.
æKY TScroller.HaveScrollBar
æD PROCEDURE TScroller.HaveScrollBar(theScrollBar: TSScrollBar; direction: VHSelect);
æFi UMacApp.p
æT METHOD
æC HaveScrollBar associates a scroll bar with a scroller. The parameter
theScrollBar is the TSScrollBar object associated with the scroller. The direction
parameter specifies whether the scroll bar is vertical or horizontal. MacApp calls
HaveScrollBar from TSScrollBar.AttachScroller, which is called in the scroll bar’s
initialization method, TSScrollBar.ISScrollBar. MacApp also calls this method
from TSScrollBar.Free to detach a scroller and a scroll bar. Free detaches a
scroll bar by passing NIL as the value for the parameter theScrollBar. You can
use this method in a similar fashion.
æKY TScroller.IRes
æD PROCEDURE TScroller.IRes (itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC IRes initializes a TScroller object from a 'view' resource template. IRes calls
INHERITED IRes to initialize the inherited data (that of TView), initializes
the TScroller data, and offsets the parameter itsParams by the length of the
TScroller parameters. The itsDocument parameter specifies the document associated
with the TScroller object. This method sets itsDocument to NIL, meaning that the
initialized scroller has no document until you associate one with it. The
itsSuperView parameter specifies the superview in which this control is to be
installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes initializing
the view, the method moves the pointer to the end of this data. MacApp calls
this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. You never need
to call IRes yourself.
æKY TScroller.IScroller
æD PROCEDURE TScroller.IScroller(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet, itsVSizeDet: SizeDeterminer; itsHorzMax, itsVertMax: VCoordinate;
wantHorzSBar, wantVertSBar: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC IScroller initializes a scroller object. The itsSuperView parameter is the view
containing the scroller. The itsLocation parameter is the scroller's location,
expressed in view coordinates. The itsSize parameter is the scroller's size,
expressed in pixels. IScroller sets the scroller’s superview, location, size, and
size determiners with a call to TView.IView. The itsHSizeDet and itsVSizeDet
parameters determine how the view’s horizontal and vertical dimensions are
calculated, respectively. Possible values are: sizeSuperView (scroller is the same
size as superview), sizeRelSuperView (scroller size changes an equal amount
relative to the superview's size), sizePage (scroller is the size of one page),
sizeFillPages (scroller expands to fill an exact number of pages), sizeVariable
(scroller size fluctuates according to application-specific criteria), and
sizeFixed (no special handling of size issues). The itsHorzMax parameter is the
maximum value the scroller can horizontally offset the subview's coordinates. The
itsVertMax parameter is the maximum value the scroller can vertically offset the
subview's coordinates. If the wantHorzSBar or wantVertSBar parameters are set
to TRUE, IScroller creates horizontal or vertical scroll bars, respectively, and
attaches them to the scroller. The scroller’s document is initially set to
NIL. MacApp calls IScroller from several methods that create scrolling views,
among them TClassListView.IClassListView, TObjListView.IObjListView,
TObjectView.IObjectView, and the global routines NewPaletteWindow and NewSimpleWindow.
You can call this method to initialize a TScroller object. You usually do not need to
override this method.
æKY TScroller.LocalToSuper
æD PROCEDURE TScroller.LocalToSuper(VAR thePoint: VPoint); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC LocalToSuper converts the given point from local view coordinates to superview
coordinates. This method overrides TView.LocalToSuper to compensate for the
scroller’s coordinate translation. The parameter thePoint is the point to be
converted from view coordinates to superview coordinates. You can call this method to
convert the coordinates of a given point in the scroller to those of its
superview.
æKY TScroller.Locate
æD PROCEDURE TScroller.Locate(h, v: VCoordinate; invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Locate adjusts the focus and validation of the scroller, its subviews, and its
superview by calling INHERITED Locate and then calling AdjustScrollBars. The
coordinates h and v specify the new location of the view’s upper-left corner, in
superview coordinates. The h parameter is the horizontal coordinate of the
upper-left corner of the scroller’s new location. The v parameter is the vertical
coordinate of the upper-left corner of the scroller’s new location. The
invalidate parameter specifies whether MacApp should force the view to redraw itself;
if invalidate is set to TRUE then the view is redrawn. MacApp calls Locate from
methods that adjust the size or shape of views. You usually do not need to call
this method yourself. You can override it if you don’t want automatic
adjustment of the scroll bars when a scroller is moved.
æKY TScroller.RemoveSubview
æD PROCEDURE TScroller.RemoveSubView(theSubView: TView); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC RemoveSubView notifies the subview that it is no longer in a scroller by calling
the subview's BeInScroller method with a parameter of NIL; it then calls
INHERITED RemoveSubView. The parameter theSubView is the subview to be notified of
the scroller's absence. You can call this method when your are changing the view
hierarchy.
æKY TScroller.Resize
æD PROCEDURE TScroller.Resize(width, height: VCoordinate;
invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method resizes the scroller and adjusts its scroll bars, redrawing if
requested. The width parameter is the scroller’s new horizontal dimension, expressed
in local view coordinates. The height parameter is the scroller’s new vertical
dimension, expressed in local view coordinates. If you set the value of the
invalidate parameter to TRUE, the view is invalidated, forcing it to be redrawn
in the update process. When you know the view will be redrawn eventually and
wish to avoid drawing it twice—which makes the screen appear to flash—you can set
the invalidate parameter to FALSE. MacApp calls Resize from methods that
manipulate views, windows, and controls. You can call Resize to change the size of
the scroller and redraw it. You can override this method to disable automatic
adjustment of the scroll bars when a scroller is resized.
æKY TScroller.RevealRect
æD PROCEDURE TScroller.RevealRect(rectToReveal: VRect; minToSee: Point;
redraw: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC RevealRect ensures that a specified minimum area of the given rectangle is
visible in the scroller. The rectToReveal parameter is the rectangle describing the
area that is to be shown. The minToSee parameter is the minimum the scroller
tries to display , scrolling if necessary. If the redraw parameter is set to
FALSE, then the scroller is not immediately redrawn. You can set redraw to FALSE
when you wish to avoid drawing the same view twice, which makes the screen appear
to flicker. MacApp typically calls RevealRect to ensure that a selection is
visible (for example, making the text insertion point visible in a text edit view
when the user starts typing).
æKY TScroller.ScrollBy
æD PROCEDURE TScroller.ScrollBy(deltaH, deltaV: VCoordinate; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC ScrollBy changes the scroller’s translation and scroll bar values by the
specified amounts. The deltaH and deltaV parameters specify the amount by which this
method changes the scroller's horizontal and vertical coordinates, respectively.
If you set redraw to TRUE, then ScrollBy redraws the contents of the scroller
to reflect the new translation. You can set redraw to FALSE when you wish to
avoid drawing the same view twice, which makes the screen appear to flicker. You
must override ScrollBy if the scroll bar's units are not the same as the
scroller’s translation units. MacApp calls ScrollBy from several methods that
manipulate views, among them TCommand.AutoScroll, TTranscriptView.Scroll, the global
routine AutoscrollTTEView, and the TScroller methods RevealRect, ScrollBy, and
ScrollTo. You rarely need to override this method.
æKY TScroller.ScrollDraw
æD PROCEDURE TScroller.ScrollDraw(delta: VPoint);
æFi UMacApp.p
æT METHOD
æC ScrollDraw carries out the drawing associated with making a view appear to
scroll by a specified amount. The delta parameter specifies the number of pixels to
scroll. MacApp calls ScrollDraw from TScroller.DoScroll; you usually do not
need to call it yourself. You usually do not need to override this method.
æKY TScroller.ScrollRelative
æD FUNCTION TScroller.ScrollRelative(vhs: VHSelect;
sBarValue: VCoordinate): VCoordinate;
æFi UMacApp.p
æT METHOD
æC ScrollRelative determines the scroller’s new translation values, causes the view
to scroll appropriately, and may return a nonzero value used to modify the
scroll bar’s value. The vhs parameter indicates the scrolling direction. The
sBarValue parameter indicates the scroll bar’s value when the user released the
mouse with the pointer in the scroll box. The new translation value is set to
sBarValue, unless mouse movement is being constrained—that is, the value of
fConstrain[vhs] is TRUE. If so, the translation value is rounded to an even multiple
of fScrollUnit[vhs], and the difference between this value and sBarValue is
returned as ScrollRelative’s result. ScrollRelative is usually called from scroll
bar objects when the user releases the mouse with the pointer in the scroll box
after tracking it in that control. This method may also be called from
application code that simulates the behavior of scroll bars or scroll boxes. You can
override ScrollRelative if the scroll bar units are not the same as the scroller’s
translation units or if you want to change scrolling behavior. You usually do
not need to call this method yourself.
æKY TScroller.ScrollStep
æD FUNCTION TScroller.ScrollStep(vhs: VHSelect; partCode: INTEGER): VCoordinate;
æFi UMacApp.p
æT METHOD
æC ScrollStep determines the distance, in pixels, that the view is to be scrolled,
causes the view to scroll appropriately, and returns the change in the scroll
bar’s value. The vhs parameter indicates whether to scroll horizontally or
vertically. The partCode parameter indicates the part of the scroll bar that was
clicked. Possible values of partCode are inUpButton, inDownButton, inPageUp, or
inPageDown. ScrollStep is usually called from scroll bar objects when the user
clicks in the scroll bar's arrow or page area. This method may also be called
from application code that simulates the behavior of scroll bars. You can override
ScrollStep if the scroll bar units are not the same as the scroller’s
translation units or if you want to change scrolling behavior. You usually do not need
to call this method yourself.
æKY TScroller.ScrollTo
æD PROCEDURE TScroller.ScrollTo(h, v: VCoordinate; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method sets the scroller’s translation and scroll bar values to the
specified values. The coordinates h and v specify the new location of the view’s
top-left corner, in superview coordinates. If you set the redraw parameter to TRUE,
this method redraws the contents of the scroller to reflect the new
translation. You can set redraw to FALSE when you wish to avoid drawing the same view
twice, which makes the screen appear to flicker. MacApp calls ScrollTo from
TScroller.DoKeyCommand to respond to events generated by the Home and End keys on the
Apple Extended Keyboard. ScrollTo is also used internally by
TScroller.SetScrollLimits. You usually do not have to call the ScrollTo method
yourself. You can override ScrollTo if the scroll bar units are not the same as the
scroller’s translation units or if you want to change scrolling behavior.
æKY TScroller.SetScrollLimits
æD PROCEDURE TScroller.SetScrollLimits(scrollLimit: VPoint; drawScrollBars: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetScrollLimits changes the scroller’s maximum translation values. If the new
maximum translation value is not equal to the current translation value, this
method calls the scroller’s ScrollTo method to reflect the new maximum
translation. The scrollLimit parameter specifies the limits to which the user can
scroll.
If the drawScrollBars parameter is TRUE the control is redrawn immediately;
usually this parameter is set to FALSE by TView.BeInScroller.
æKY TScroller.SetScrollParameters
æD PROCEDURE TScroller.SetScrollParameters(horzUnits, vertUnits: VCoordinate;
horzConstraint, vertConstraint: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SetScrollParameters sets the scroller’s fScrollUnits and fConstrain fields to
the specified parameters. The parameters horzUnits and vertUnits specify the
amount of change, either horizontally or vertically, to be made in the translation
values when the scroller receives a “scroll-by-arrow” message. The
horzConstraint and vertConstraint parameters are set to TRUE if the translation values
should be constrained to even multiples of fScrollUnits in either the horizontal or
vertical direction. MacApp calls SetScrollParameters from TTEView.BeInScroller
to set the scroller parameters and limits for a scrolling TTEView object. A
number of initialization methods that deal with scrolling views call
SetScrollParameters to perform the same task; among these are the methods
TTEView.BeInScroller, TScroller.IRes, and TScroller.IScroller. You can call
SetScrollParameters
to specify a scroller's scroll units; you usually make this call in the view's
initialization method. You rarely need to override this method.
æKY TScroller.SubViewChangedSize
æD PROCEDURE TScroller.SubViewChangedSize(theSubView: TView; delta: VPoint); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC SubViewChangedSize sets the scroller’s fMaxTranslation and fScrollLimit fields
to reflect the size of the specified subview. The parameter theSubView specifies
the view for which this method adjusts the scroller. The delta parameter is
the amount by which the subview changed size. You probably will not need to
override this method. You can call this method when you change the size of a subview
of a scroller.
æKY TScroller.SuperToLocal
æD PROCEDURE TScroller.SuperToLocal(VAR thePoint: VPoint); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC SuperToLocal converts the given point from superview coordinates to local view
coordinates. This method overrides TView.SuperToLocal to compensate for the
scroller’s coordinate translation. The parameter thePoint is the point that will be
converted to local view coordinates. You usually do not need to override this
method.
æKY TScroller.WRes
æD PROCEDURE TScroller.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WRes writes the TScroller portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TScroller section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the
end of the previously-written resource data; if there is not enough space to
write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and
the size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when
the WRes method completes.
æKY TScroller.WriteRes
æD PROCEDURE TScroller.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('scrl') and
class name ('TScroller') for the 'view' resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TScroller object as part of a 'view' resource; you can use it in a similar fashion.
You can override this method to provide your own unique class name or
signature.
æKY TSortedList.Compare
æD FUNCTION TSortedList.Compare(item1, item2: TObject): CompareResult;
æFi UList.p
æT METHOD
æC The Compare method compares two items in a list. The default method compares the
ordinal value of the two items, and returns one of the constants
kItem1LessThanItem2, kItem1EqualItem2, or kItem1GreaterThanItem2, according to whether
the ordinal value of item1 is less than, equal to, or greater than the ordinal value
of item2. The item1 and item2 parameters are the objects that Compare ranks.
Compare is called by TSortedList.GetEqualItemNo and TSortedList.Insert. You can
call Compare to compare the ordinal values of two objects in a list. You must
override Compare to do any other kind of comparison. In your override, you
should return an integer that is less than, equal to, or greater than 0 according to
whether item1 is less than, equal to, or greater than item2.
æKY TSortedList.DoSearch
æD FUNCTION TSortedList.DoSearch(FUNCTION TestItem(anItem: TObject): CompareResult;
VAR index: ArrayIndex): TObject;
æFi UList.p
æT METHOD
æC DoSearch performs a binary search on the sorted TList list until TestItem
returns 0 or there are no more items to search. The TestItem routine is passed to
DoSearch as a parameter. The anItem parameter is bound to each item in the list in
turn. The index parameter is used locally by TestItem to search the list in
order. DoSearch is called by TSortedList.GetEqualItemNo, TSortedList.Insert, and
TSortedList.Search. You can override DoSearch to provide your own search
algorithm.
æKY TSortedList.Fields
æD PROCEDURE TSortedList.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UList.p
æT METHOD
æC Fields reports the contents of each field of the TSortedList object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TSortedList object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action
to ensure that the inherited fields are also displayed.
æKY TSortedList.GetEqualItemNo
æD FUNCTION TSortedList.GetEqualItemNo(item: TObject): ArrayIndex; OVERRIDE;
æFi UList.p
æT METHOD
æC GetEqualItemNo returns the index of any element in the list that this object's
Compare method considers to be equal to the item parameter. The item parameter
is an object in the list. You can call GetEqualItemNo when you want the index of
an item meeting your specified search criteria.
æKY TSortedList.Insert
æD PROCEDURE TSortedList.Insert(item: TObject); OVERRIDE;
æFi UList.p
æT METHOD
æC Insert places the specified item in the list in sorted order, using this
object's Compare method to determine the item's location relative to other items in
the list. The item parameter specifies the object to be placed in the list. You
can override this method to insert an object in sorted order in a list.
æKY TSortedList.ISortedList
æD PROCEDURE TSortedList.ISortedList;
æFi UList.p
æT METHOD
æC ISortedList initializes a new sorted list. The default method simply calls
TList.IList. IList is called by several methods as part of their initialization
procedures, including TCommandList.ICommandList and TEntriesList.IEntriesList. You
can call it to set initial values for the fields of a TSortedList object; you
must always call it once before calling any other method, but never call it twice.
æKY TSortedList.Search
æD FUNCTION TSortedList.Search(FUNCTION TestItem(anItem: TObject):
CompareResult): TObject;
æFi UList.p
æT METHOD
æC Search calls DoSearch for each item in the list. Search calls TestItem until
TestItem returns 0 or there are no more entries in the list. You must write the
TestItem function to implement your search criteria. The TestItem routine is
passed to DoSearch as a parameter. The anItem parameter is an object that TestItem
compares with each item in the list. A negative TestItem result indicates that
your search criterion is less than anItem. A positive TestItem result indicates
that your search criterion is greater than anItem. Search is called by
TAssociation.EntryWithKey,, TAssociation RemoveValueAt, and TAssociation.ValueAt. You
can use it to obtain an object that meets specific search criteria.
æKY TSortedList.Sort
æD PROCEDURE TSortedList.Sort;
æFi UList.p
æT METHOD
æC Sort sorts a list by calling TList.SortBy, which in turn calls
TSortedList.Compare. You can call this method to sort a list of objects.
æKY TSScrollBar.Activate
æD PROCEDURE TSScrollBar.Activate(entering: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC After focusing, Activate either draws the scroll bar or draws just the frame of
the scroll bar, according to the value of the entering parameter. When the
value of the entering parameter is TRUE, Activate calls the Toolbox routine
ShowControl for the control named in the fCmgrControl field. When the value of
entering is FALSE, Activate calls HideControl to hide the control and then calls
TSScrollBar.Draw to draw its frame. In both cases, Activate validates the scroll
bar’s rectangle to avoid unnecessary window updates. MacApp calls Activate when
the view containing a TSScrollBar object is made active. Usually this is in
response to a user-generated event such as clicking on the scroll bar itself or
making its window the active window. You never need to call Activate yourself
unless you change the way MacApp implements scroll bars.
æKY TSScrollBar.AttachScroller
æD PROCEDURE TSScrollBar.AttachScroller(itsScroller: TScroller);
æFi UMacApp.p
æT METHOD
æC AttachScroller adds a TScroller object to the list of items associated with a
TSScrollBar object, and then associates the scroller with the TSScrollBar object.
The itsScroller parameter is the TScroller object that is to be associated
with the TSScroller scroll bar. AttachScroller is called by
TSScrollBar.ISScrollBar when initializing a TSScrollbar object. It is also called by
TScroller.CreateTemplateScrollBar when creating a new TScroller object. You can call
AttachScroller to associate TSScrollBar objects with instances of TScroller.
æKY TSScrollBar.BeInPort
æD PROCEDURE TSScrollBar.BeInPort(itsPort: GrafPtr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC BeInPort associates the TSScrollBar object with the specified grafPort by
calling TCtlMgr.BeInPort; it also associates the scroll bar with a window and sets
the visibility of the scroll bar based on the state of that window. The itsPort
parameter is a pointer to the grafPort in which the TSScrollBar object is to be
drawn; the grafPort is used to support graphics or printing operations on the
control. MacApp uses BeInPort in TView methods that change active views. You
usually do not need to call this method yourself.
æKY TSScrollBar.DoMouseCommand
æD FUNCTION TSScrollBar.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo; VAR
hysteresis: Point): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMouseCommand is overridden to track the mouse when it is in the scroll box
(sometimes called the thumb); it retuns NIL. When the mouse button is released,
this method passes the scroll bar’s value to each controlled view’s
ScrollRelative method. The values returned by each ScrollRelative method are added to
the scroll bar’s value. If a part other than the scroll box is clicked, this method
calls INHERITED DoMouseCommand. The parameter theMouse is the mouse pointer’s
current location, described in view coordinates. The info parameter is the event
record of the mouse-down event that caused DoMouseCommand to be called. The
hysteresis parameter is a point that represents the horizontal and vertical
distance the mouse can travel between clicks and still be considered to be at the
same location. MacApp uses this parameter to determine whether a double click has
occurred or if a control has moved. DoMouseCommand is called when MacApp
receives a mouse-down event in a TSScrollBar object. You usually do not need to call
this method yourself.
æKY TSScrollBar.Draw
æD PROCEDURE TSScrollBar.Draw(area: Rect); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Draw is overridden so that if the scroll bar is invisible (and assumed to be
inactive), its rectangle is framed. Otherwise, INHERITED Draw is called. The area
parameter is not used by TSScrollbar.Draw. MacApp calls this method in response
to an update event occurring in the scroll bar. You usually do not need to
call this method yourself.
æKY TSScrollBar.Fields
æD PROCEDURE TSScrollBar.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TSScrollBar object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TSScrollBar object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action
to ensure that the inherited fields are also displayed.
æKY TSScrollBar.Free
æD PROCEDURE TSScrollBar.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free detaches SELF from its associated scroller, frees the list of scrollers,
and then calls INHERITED Free. MacApp calls Free when disposing of a scroller; it
also calls Free from TScroller.CreateScrollBar if the creation of the scroll
bars fails. You can call this method to dispose of a TSScrollBar object;
however, you usually do not need to do so yourself because MacApp calls Free when
disposing of the window or last view associated with the scroller. You usually do
not need to override this method unless you have changed the way MacApp
associates scrollers with views.
æKY TSScrollBar.IRes
æD PROCEDURE TSScrollBar.IRes(itsDocument: TDocument; itsSuperView: TView; VAR
itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC IRes initializes a TSScrollBar object from a 'view' resource template. This
method calls INHERITED IRes, which sets the fDefChoice field to mVScrollBarHit or
mHScrollBarHit, according to whether the control area’s vertical or horizontal
dimension is greater. The itsDocument parameter specifies the document affected
by the scroll bar’s action. The itsSuperView parameter is the view in which
this scroll bar appears. The itsParams parameter is a pointer to the portion of
the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call.
You never need to call IRes yourself.
æKY TSScrollBar.ISScrollBar
æD PROCEDURE TSScrollBar.ISScrollBar (itsSuperView: TView; itsLocation,
itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer; itsDirection: VHSelect;
itsMax: LONGINT; itsScroller: TScroller);
æFi UMacApp.p
æT METHOD
æC This method initializes a TSScrollBar object and associates it with a view. The
itsSuperView parameter is the view in which the scroll bar (which itself is a
view) appears. The itsLocation parameter is the control’s location, expressed in
view coordinates. The itsSize parameter is the control’s size, in pixels. The
itsHSizeDet and itsVSizeDet parameters determine how the view’s horizontal and
vertical dimensions are calculated, respectively. Possible values are:
sizeSuperView (subview is the same size as superview), sizeRelSuperView (subview size
changes an equal amount relative to the superview's size), sizePage (view is the
size of one page), sizeFillPages (view expands to fill an exact number of
pages), sizeVariable (view size fluctuates according to application-specific
criteria), and sizeFixed (no special handling of size issues). The itsDirection
parameter is the direction in which the control is offset. The itsMax parameter is
the maximum value the control can have. The itsScroller parameter is the
TScroller object that is associated with this object. ISScrollBar is called by
TScroller.CreateScrollBar to initialize the TSScrollBar object associated with the
scroller. You can use ISScrollBar in similar fashion.
æKY TSScrollBar.TrackScrollBar
æD PROCEDURE TSScrollBar.TrackScrollBar (partCode: INTEGER); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method tracks the mouse while the pointer is in a scroll bar's arrow or
page area and keeps any associated scrollers synchronized with the scroll bar. The
partCode parameter indicates the part of the scroll bar that was clicked (the
up arrow, down arrow, or one of the page areas). If the mouse was pressed in
the scroll bar's page up area or up arrow, partCode has the value inPageUp or
inUpButton, respectively, and TrackScrollBar sets DeltaValue to -1. Otherwise, it
sets DeltaValue to 1. TrackScrollBar is called by TScrollbar.ActionProc in
response to a mouse event in a scroll bar's active area. You never need to call
TrackScrollBar yourself unless you change the way MacApp implements scroll bars.
You can override this method if you want an action to take place while the
pointer is being tracked in the scroll bar’s arrows or page areas. Typically the
action taken is to change the scroll bar’s value appropriately.
æKY TSScrollBar.WriteRes
æD PROCEDURE TSScrollBar.WriteRes (theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes is overriden to be an empty method so that TSScrollBar objects are not
written as part of a 'view' resource. TScroller objects create their own scroll
bars. The parameter theResource is a handle to the view’s resource template.
The parameter itsParams is a pointer to the parameters MacApp uses to create the
new resource. This version of WriteRes ignores these parameters. MacApp does
not call this method; you should not, either.
æKY TStaticText.ChangeWrap
æD PROCEDURE TStaticText.ChangeWrap(newAutoWrap, redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC ChangeWrap sets the wrapping behavior of the TStaticText object according to the
specified value. If the newAutoWrap parameter is set to TRUE, then the
TStaticText object will subsequently wrap a line of text to the next line (if
necessary) to prevent the line from extending beyond the right edge of the view. If
newAutoWrap is set to FALSE, then the TStaticText object subsequently permits text
lines to be longer than the width of the view, wrapping to a new line only at
carriage returns. If the value of the redraw parameter is TRUE then the
TStaticText object invalidates the view; otherwise, it does not. You can use this
method to control the wrapping behavior of TStaticText views.
æKY TStaticText.DoSubstitution
æD PROCEDURE TStaticText.DoSubstitution(VAR theText: Str255);
æFi UDialog.p
æT METHOD
æC DoSubstitution substitutes a text string for paramText in a TDialogView view
each time the view is drawn. The theText parameter is the string that replaces the
paramText. TStaticText.Draw calls DoSubstitution to place the text in the dialog.
æKY TStaticText.Draw
æD PROCEDURE TStaticText.Draw(area: Rect); OVERRIDE;
æFi UDialog.p
æT METHOD
æC This method draws the substituted text in a TDialog view and then calls other
methods necessary to complete drawing the view, including INHERITED Draw.
TStaticText.Draw accomplishes much of its task by calling ImageText, which in turn
calls the global routine MATextBox. The area parameter is the QuickDraw rectangle,
specified in local view coordinates, that defines the boundaries of the view;
the value of this parameter is passed for use by INHERITED Draw. MacApp calls
this method in response to an update event occurring in the TStaticText view.
You usually do not need to call this method yourself.
æKY TStaticText.Fields
æD PROCEDURE TStaticText.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UDialog.p
æT METHOD
æC Fields reports the contents of each field of the TStaticText object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TStaticText object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector.
You must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action
to ensure that the inherited fields are also displayed.
æKY TStaticText.Free
æD PROCEDURE TStaticText.Free; OVERRIDE;
æFi UDialog.p
æT METHOD
æC Free releases the memory used by the handles to TStaticText text strings and
then calls INHERITED Free to release the memory used by dependent structures.
MacApp calls Free when closing a view containing a TStaticText view. You can call
Free to release the memory used by a TStaticText object when you no longer need
that object.
æKY TStaticText.GetText
æD PROCEDURE TStaticText.GetText(VAR theText: Str255);
æFi UDialog.p
æT METHOD
æC GetText retrieves the current text drawn by TStaticText.Draw. When GetText
returns, the parameter theText stores the text string that this method retrieves.
The string stored in theText s to be substituted for parameterized text in a
TDialogView view. If there is no current text, the empty string is returned.
TStaticText.Draw calls this method to retrieve the text that it draws. You usually do
not need to call this method yourself.
æKY TStaticText.ImageText
æD PROCEDURE TStaticText.ImageText(text: Ptr; Length: LONGINT; box: Rect;
just: INTEGER);
æFi UDialog.p
æT METHOD
æC ImageText is called from the Draw method to draw the specified text in the
rectangle indicated by the box parameter with justification just. ImageText simply
calls the global routine MATextBox; the following information is essentially the
same as that for MATextBox. The text parameter is a pointer to the text to be
drawn, and the length parameter indicates the number of characters to draw. The
box parameter is a Rect (specified in view coordinates) that must be at least
as wide as the first character drawn (about 20 pixels is usually a good width).
The just parameter is an integer specifying the type of justification with
which to draw the text. TextBox does not create an edit record, nor can the text
that it draws be edited; it's used solely for drawing text. Because Pascal
strings start with a length byte, you must advance the pointer one position past the
beginning of the string to point to the start of the text. TStaticText.Draw
calls this method to draw the text in the TStaticText view. You usually don’t
need to call this method yourself.
æKY TStaticText.IRes
æD PROCEDURE TStaticText.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC IRes initializes a TStaticText object from a 'view' resource template. The
fDefChoice field is set to mStaticTextHit. The itsDocument parameter specifies the
document associated with the TStaticText object. The itsSuperView parameter is
the view in which the TStaticText object appears. The itsParams parameter is a
pointer to the portion of the 'view' resource data used to initialize this view.
When the IRes method finishes initializing the view, the method moves the
pointer to the end of this data. MacApp calls this method for each of the views
created from a 'view' resource template, usually in response to a
NewTemplateWindow or a DoCreateViews call. You never need to call IRes yourself.
æKY TStaticText.IStaticText
æD PROCEDURE TStaticText.IStaticText(itsSuperView: TView; itsLocation, itsSize: VPoint;
itsHSizeDet,itsVSizeDet: SizeDeterminer; itsRsrcID, itsIndex: INTEGER);
æFi UDialog.p
æT METHOD
æC IStaticText initializes a static text item and installs it in the given
superview. The fDefChoice field is set to mStaticTextHit. The itsSuperView parameter
is the view in which the text (which itself is a control) appears. The
itsLocation parameter is the control’s location in view coordinates. The itsSize
parameter is the control’s size in pixels. The itsHSizeDet and itsVSizeDet parameters
determine how the view’s horizontal and vertical dimensions are calculated,
respectively. Possible values are: sizeSuperView (subview is the same size as
superview), sizeRelSuperView (subview size changes an equal amount relative to the
superview's size), sizePage (view to be the size of one page), sizeFillPages
(view expands to fill an exact number of pages), sizeVariable (view size
fluctuates according to application-specific criteria), and sizeFixed (no special
handling of size issues). The itsRsrcID parameter is the integer that MacApp uses to
refer to the string list ('STR') resource. The itsIndex parameter is the
integer specifying which string will be returned from a string list.
æKY TStaticText.ReleaseText
æD PROCEDURE TStaticText.ReleaseText;
æFi UDialog.p
æT METHOD
æC This method releases memory used by the handles to text strings. It also resets
fRsrcID to the value of kNoResource and resets the fDataHandle field to NIL.
TStaticText.Free calls this method. You usually don’t need to call this method.
æKY TStaticText.SetJustification
æD PROCEDURE TStaticText.SetJustification(theJust: INTEGER; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC This method stores the value of theJust in fJust and redraws the view if
desired. The parameter theJust is an integer specifying text justification, as
follows: teJustLeft = 0 teJustCenter = 1 teJustRight = -1 teForceLeft = -2
teJustSystem = teJustLeft. If the redraw parameter is set to TRUE, the view will be
redrawn with the new text. If redraw is set to FALSE, then the view will not be
redrawn even though the new text may affect its appearance. You can set redraw to
FALSE when you know the control will be redrawn eventually and you wish to avoid
drawing it twice, which makes the screen appear to flicker.
æKY TStaticText.SetText
æD PROCEDURE TStaticText.SetText(theText: Str255; redraw: BOOLEAN);
æFi UDialog.p
æT METHOD
æC SetText installs the specified text in the TStaticText view by setting the value
of fDataHandle to a copy of the string specified in the parameter theText. If
requested to do so, this method redraws the view with the new text. The
parameter theText is the string to be placed in a TStaticText view. If you set the
value of the redraw parameter to TRUE, and the view is focused and visible, the
view is redrawn immediately with the new text. If you set the value of the redraw
parameter to FALSE, the view is not redrawn even though the new text may
affect its appearance. You can set redraw to FALSE when you know the view is redrawn
eventually and you wish to avoid drawing it twice, which makes the screen
appear to flash. MacApp calls this method to install text in a TStaticText object
when it is being initialized. You can call this method to install or change text
in a TStaticText view.
æKY TStaticText.WRes
æD PROCEDURE TStaticText.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WRes writes the TStaticText portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a handle
to the view’s resource template. The parameter itsParams is a pointer to the
TStaticText section of the view’s resource template. WRes is the inverse of the
IRes method, and is used only by programs that write 'view' resources; for
example, ViewEdit uses this method to create new 'view' resources from views that
are active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources.
Your override should check the size of the space remaining in the template past
the end of the previously-written resource data; if there is not enough space
to write your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams,
and the size of your resource data, in bytes. ExpandPtr expands the 'view'
resource handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too
big, because MacApp reclaims unused space by returning a new value for itsParams
when the WRes method completes.
æKY TStaticText.WriteRes
æD PROCEDURE TStaticText.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UDialog.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('stat') and
class name ('TStaticText') for the ‘view’ resource template, and then calls WRes
to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TStaticText object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TStdPrintHandler.AdornPage
æD PROCEDURE TStdPrintHandler.AdornPage;
æFi UPrinting.p
æT METHOD
æC AdornPage draws page adornments that are not drawn by the view itself, such as
page numbers. If gDebugPrinting is TRUE, then AdornPage prints the page number
and draws a box around the interior of the page and another around the printable
area of the page. MacApp calls AdornPage when it is about to print a page and
the value of the global gDebugPrinting is TRUE. You usually do not need to call
this method yourself, but you can override this method to supply your own
adornments.
æKY TStdPrintHandler.BanishPrintDialog
æD PROCEDURE TStdPrintHandler.BanishPrintDialog;
æFi UPrinting.p
æT METHOD
æC BanishPrintDialog disposes of the printing dialog box displayed by
ShowDocBeingPrinted or PosePrintDialog. MacApp calls BanishPrintDialog when the user
dismisses the printing dialog box. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.BreakFollowing
æD FUNCTION TStdPrintHandler.BreakFollowing(vhs: VHSelect; prevBreak: VCoordinate;
VAR automatic: BOOLEAN): VCoordinate; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC BreakFollowing returns the location of the page break that follows the specified
page break. The vhs parameter specifies whether the page break to be found is
a horizontal or vertical page break; a value of h specifies a horizontal break,
and a value of v specifies a vertical one. The prevBreak parameter specifies
the page break preceding the one that is to be found. The automatic parameter is
returned as TRUE if the page break is an automatic break, as opposed to a
user-specified page break. By default in MacApp 2.0, BreakFollowing always sets the
automatic parameter to TRUE. MacApp calls BreakFollowing from
TView.DoBreakFollowing when it needs to determine the location of a particular page
break. You usually do not need to call this method yourself. You can override this
method to support manual page breaks.
æKY TStdPrintHandler.CalcPageStrips
æD PROCEDURE TStdPrintHandler.CalcPageStrips(VAR pageStrips: Point); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC CalcPageStrips calculates the height and width of the TStdPrintHandler’s
associated view. The result is expressed in numbers of pages in each dimension.
CalcPageStrips stores the result of its calculation in pageStrips. MacApp calls
CalcPageStrips from methods that prepare the view’s image for printing. You usually
do not need to call this method yourself.
æKY TStdPrintHandler.CalcViewPerPage
æD PROCEDURE TStdPrintHandler.CalcViewPerPage(VAR amtPerPage: VPoint); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC CalcViewPerPage calculates the portion of the TStdPrintHandler’s associated view
that will appear on each printed page. The result is expressed in numbers of
pixels in each dimension. CalcViewPerPage stores the result of its calculation
in amtPerPage. MacApp calls CalcViewPerPage from methods that prepare the view’s
image for printing. You usually do not need to call this method yourself.
æKY TStdPrintHandler.CheckPrinter
æD PROCEDURE TStdPrintHandler.CheckPrinter; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC CheckPrinter determines whether the printer-configuration parameters have
changed. If they have changed then this method changes the object’s corresponding
fields to reflect the new configuration. MacApp calls CheckPrinter from a variety
of methods that use printer-configuration information. You usually do not need
to call this method yourself.
æKY TStdPrintHandler.ChkPrintErr
æD PROCEDURE TStdPrintHandler.ChkPrintErr(VAR err: OSErr; VAR proceed: BOOLEAN;
VAR ranOutOfSpace: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC ChkPrintErr checks for a Printing Manager error, but only if the value of the
proceed parameter is TRUE on entry. The method handles the error that occurs if
the error code indicates a disk-space problem during the saving of a spool file.
The err parameter is set to the value of the operating system error. The
proceed parameter determines whether the print error is checked. The ranOutOfSpace
parameter is set to TRUE if there is a disk-space error. MacApp calls
ChkPrintErr from several TStdPrintHandler methods to determine whether a Printing
Manager error occurred. You usually do not need to call this method yourself.
æKY TStdPrintHandler.ChooseSpoolFile
æD PROCEDURE TStdPrintHandler.ChooseSpoolFile (VAR spoolFileName: Str255;
VAR spoolVRefNum: INTEGER; VAR pagesPerSubjob: INTEGER);
æFi UPrinting.p
æT METHOD
æC ChooseSpoolFile obtains the filename and volume of the print spool file, and the
number of pages to be spooled before the spooled file is printed. This
information is relevant only for spooled printing. The spoolFileName parameter stores
the name of the spool file. The spoolVRefNum parameter stores the volume
reference number of the volume containing the spool file. The pagesPerSubJob
parameter stores the number of pages in each subjob of the spooled printing job.
Unless overridden, ChooseSpoolFile stores an empty string in spoolFileName and 0 in
spoolVRefNum (indicating that the print driver should use its standard
filename), and stores the constant MAXINT in pagesPerSubjob. MacApp calls
ChooseSpoolFile from TView.Print if the print job is a spooled job. You usually do not
need to call this method yourself.
æKY TStdPrintHandler.ClosePrintShop
æD PROCEDURE TStdPrintHandler.ClosePrintShop;
æFi UPrinting.p
æT METHOD
æC ClosePrintShop terminates printing activity by calling the Macintosh Toolbox
routine PrClose. This method does not signal failure if an error occurs; it only
writes an error message to the Debug Transcript. MacApp calls ClosePrintShop
when it has finished printing a view. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.DoInMacPrint
æD PROCEDURE TStdPrintHandler.DoInMacPrint(PROCEDURE WhatToDo);
æFi UPrinting.p
æT METHOD
æC This method sandwiches a call to WhatToDo between the Macintosh Toolbox routines
PrOpen and PrClose. The WhatToDo parameter is a procedure with no arguments
that you must declare and implement yourself. MacApp calls DoInMacPrint from
several TStdPrintHandler methods to perform actions that need to be executed while
the Printing Manager is active. You can use DoInMacPrint to perform any actions
that must happen with the Printing Manager active.
æKY TStdPrintHandler.DoMenuCommand
æD FUNCTION TStdPrintHandler.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC DoMenuCommand handles commands associated with the TStdPrintHandler object.
Because print handlers are not normally a part of the target chain, this method is
explicitly called from the view or document associated with the print handler.
The default method returns a TCommand object to handle the commands cPrint,
cPrintOne, and cPageSetup; the method handles the cShowBreaks command directly.
All other commands are returned to the command chain by calling INHERITED
DoMenuCommand. The parameter aCmdNumber is the command number that specifies the
command to be processed. MacApp calls DoMenuCommand from event-handling methods that
respond to a user’s menu selections. You usually do not need to call this
method yourself.
æKY TStdPrintHandler.DoPrintIdling
æD PROCEDURE TStdPrintHandler.DoPrintIdling;
æFi UPrinting.p
æT METHOD
æC DoPrintIdling is the print job idle time handler. The method handles events in
the printing dialog boxes that allow the user to cancel print jobs and, in the
case of printing from the Finder, to cancel all printing.
æKY TStdPrintHandler.DoSetupMenus
æD PROCEDURE TStdPrintHandler.DoSetupMenus; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC DoSetupMenus enables the menu items associated with the TStdPrintHandler object.
MacApp calls DoSetupMenus when the application sets up its menu bar, and when
the view associated with the TStdPrintHandler object becomes active. You
usually do not need to call this method yourself, but you can call it whenever you
want to ensure that the menu items associated with the TStdPrintHandler object
are enabled. If you override this method in your subclasses,your override must
call INHERITED DoSetupMenus as its first action, to allow other handlers to
enable menu items to which they can respond.
æKY TStdPrintHandler.DrawPageBreak
æD PROCEDURE TStdPrintHandler.DrawPageBreak (vhs: VHSelect; whichBreak: INTEGER;
loc: VCoordinate; automatic: BOOLEAN); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC DrawPageBreak implements the standard means of drawing a page break in the print
handler’s associated view while it is displayed on the screen. This method
draws a gray line two pixels wide at each page break. If the value of
gDebugPrinting is true then it draws the page numbers at the intersections of the
vertical and horizontal page breaks. The vhs parameter specifies whether the page
break to be drawn is vertical or horizontal. The whichBreak parameter specifies which
page break in numerical sequence is to be drawn. The loc parameter specifies
the top-left corner of the page, in view coordinates. The automatic parameter
specifies whether the page break was computed automatically by the application or
was placed manually by the user; ifthe value of automatic is TRUE, then the
page break was computed automatically. MacApp calls DrawPageBreak from
TView.DoDrawPageBreak. You usually do not need to call this method yourself.
æKY TStdPrintHandler.DrawPageInterior
æD PROCEDURE TStdPrintHandler.DrawPageInterior;
æFi UPrinting.p
æT METHOD
æC DrawPageInterior draws the interior of the page to be printed by calling the
view’s DrawContents method. MacApp calls DrawPageInterior from
TStdPrintHandler.PrintPage. You usually do not need to call this method yourself.
æKY TStdPrintHandler.DrawPrintFeedback
æD PROCEDURE TStdPrintHandler.DrawPrintFeedback(area: Rect); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC DrawPrintFeedback draws the associated view’s page breaks, page numbers, and
borders. It can also draw additional information, such as tab stops and rulers.
The area parameter is the rectangular area of the view that is visible on the
screen. MacApp calls DrawPrintFeedback when it needs to display a view’s printing
information, such as page breaks and page numbers. You usually do not need to
call this method yourself.
æKY TStdPrintHandler.EachBreak
æD PROCEDURE TStdPrintHandler.EachBreak(vhs: VHSelect; includeLast: BOOLEAN;
FUNCTION DoToBreak(loc: VCoordinate; automatic: BOOLEAN): BOOLEAN);
æFi UPrinting.p
æT METHOD
æC EachBreak iterates through the page breaks in the direction specified, calling
DoToBreak for each page break. It terminates when DoToBreak returns TRUE or when
DoToBreak has been called for the last page break (or for the next-to-the-last
if the value of includeLast is FALSE). The locations of page breaks are
determined by calling fView.DoBreakFollowing. The vhs parameter specifies whether the
page breaks to be processed are vertical or horizontal. A value of v indicates
that they are vertical, and a value of h indicates they are horizontal. If the
includeLast parameter is set to TRUE, then EachBreak iterates over all page
breaks; otherwise ,it iterates over all but the last. DoToBreak is a separately
defined function that is called with its argument loc bound to the location of
each page break in turn. If the automatic parameter is set to TRUE, then the
page break being processed by an iteration is considered to have been computed
automatically by the application, rather than having been placed manually by the
user. EachBreak is used by CalcPageStrips if the page strips are of varying
sizes and by DrawPrintFeedback to display page breaks. You usually do not need to
call EachBreak yourself, but you can use it whenever you want to iterate over
all page breaks in a view. In such cases you must define an appropriate function
to be called on each page break and pass the function as a parameter to
EachBreak.
æKY TStdPrintHandler.Fields
æD PROCEDURE TStdPrintHandler.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER));
æFi UPrinting.p
æT METHOD
æC Fields reports the contents of each field of the TStdPrintHandler object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TStdPrintHandler object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TStdPrintHandler.FocusOnBorder
æD PROCEDURE TStdPrintHandler.FocusOnBorder;
æFi UPrinting.p
æT METHOD
æC FocusOnBorder sets the clipping region of the TStdPrintHandler object’s
associated view to the area of an entire page, so that page adornments can be drawn
outside a page’s interior. MacApp calls FocusOnBorder when it needs to print a
page with adornments. You can use this method in a similar fashion.
æKY TStdPrintHandler.FocusOnInterior
æD PROCEDURE TStdPrintHandler.FocusOnInterior; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC FocusOnInterior sets the QuickDraw clipping region to the printable area of the
view. MacApp calls FocusOnInterior from PrintPage. You usually do not need to
call this method yourself.
æKY TStdPrintHandler.Free
æD PROCEDURE TStdPrintHandler.Free; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Free releases the memory used by the TStdPrintHandler object and performs any
auxiliary cleanup that may be necessary, such as freeing other objects to which
the TStdPrintHandler object contains references. MacApp calls Free to dispose of
the print handler when a print job is completed or when a print job fails. You
usually do not need to call this method yourself.
æKY TStdPrintHandler.GetBreakCoord
æD PROCEDURE TStdPrintHandler.GetBreakCoord(vhs: VHSelect; whichBreak: INTEGER;
VAR loc: VCoordinate);
æFi UPrinting.p
æT METHOD
æC GetBreakCoord returns the view coordinate for the specified page break. The vhs
parameter indicates whether the page break is horizontal or vertical. The
whichBreak parameter is the page break number, where the first page break is
numbered 1. GetBreakCoord stores the coordinate of the page break in loc. After
computing the page break location, GetBreakCoord caches the page break coordinate in
fLastStrip.vh[vhs] and fLastBreak.vh[vhs]. MacApp uses GetBreakCoord to
determine what part of the view is printed on each page and to locate page breaks
after recomputing them. You usually do not need to call this method yourself.
æKY TStdPrintHandler.GetDocName
æD PROCEDURE TStdPrintHandler.GetDocName(VAR docName: Str255);
æFi UPrinting.p
æT METHOD
æC GetDocName obtains the name that is used for a document in printing dialog boxes
and error messages. If a document is associated with the TStdPrintHandler
object, then the title of the document is returned in the docName parameter. If no
document is associated with the TStdPrintHandler object, then the name of the
window associated with the view is returned in the docName parameter. MacApp
calls GetDocName to retrieve the name of the document for printing purposes. You
usually do not need to call this method.
æKY TStdPrintHandler.GetDriverName
æD PROCEDURE TStdPrintHandler.GetDriverName(VAR driverName: Str255);
æFi UPrinting.p
æT METHOD
æC GetDriverName retrieves the name of the current printer driver. The driverName
parameter stores the retrieved name. MacApp calls GetDriverName from
TStdPrintHandler.CheckPrinter to retrieve the name of the current printer driver. You
usually do not need to call this method yourself.
æKY TStdPrintHandler.IdentifySoftware
æD PROCEDURE TStdPrintHandler.IdentifySoftware; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC IdentifySoftware writes the version of the UPrinting unit to the Debug
Transcript window, and then calls INHERITED IdentifySoftware. MacApp calls
IdentifySoftware from TApplication.DoMenuCommand when the user chooses the
Show Software Version command from the Debug menu. You usually do not need to call
IdentifySoftware yourself.
æKY TStdPrintHandler.InstallMargins
æD PROCEDURE TStdPrintHandler.InstallMargins(newMargins: Rect;
areMinimalMargins: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC InstallMargins sets the values of the fields fPageAreas.theMargins and
fPageAreas.theInterior using the specified rectangle. The newMargins parameter is the
rectangular area that MacApp uses to define the interior of the page; the margins
are composed of the area outside that rectangle. If the areMinimalMargins
parameter is set to TRUE, then MacApp uses the “minimal margins” scheme; in this
scheme, MacApp always maintains margins at the size necessary to have the page
interior coincide exactly with the printable area of the page. MacApp calls
InstallMargins from methods that change the margins on a printable page. You usually
do not need to call this method yourself.
æKY TStdPrintHandler.InvalPageFeedback
æD PROCEDURE TStdPrintHandler.InvalPageFeedback;
æFi UPrinting.p
æT METHOD
æC InvalPageFeedback forces the printing feedback images of a document’s displayed
view to be redrawn. MacApp calls InvalPageFeedback when the page breaks change
or when the state of the fShowBreaks field changes. MacApp calls
InvalPageFeedback from event-handling methods that can change the arrangement of
printing feedback information, such as the location of page breaks. You usually do not
need to call this method yourself, but you can use it to ensure that the feedback
information in the current display is correct.
æKY TStdPrintHandler.IStdPrintHandler
æD PROCEDURE TStdPrintHandler.IStdPrintHandler(itsDocument: TDocument;
itsView: TView; itsSquareDots, itsHFixedSize, itsVFixedSize: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC IStdPrintHandler initializes a TStdPrintHandler object. It associates the
TStdPrintHandler object with a view and a document. The method also sets the
TStdPrintHandler object’s fields to default values. The itsDocument parameter is the
TDocument object to be associated with the TStdPrintHandler object. The itsView
parameter is the TView object to be associated with it. If the itsSquareDots
parameter is set to TRUE, then the TStdPrintHandler object assumes that the dots
used to print the view should be square. If the itsHFixedSize parameter is set
to TRUE, then the print handler assumes that the horizontal dimension of the
page is fixed; if itsVFixedSize is set to TRUE, then it assumes that the vertical
page dimension is fixed. You must call IStdPrintHandler when you create a new
TStdPrintHandler object. Do not override IStdPrintHandler.
æKY TStdPrintHandler.LocatePageInterior
æD PROCEDURE TStdPrintHandler.LocatePageInterior(pageNumber: INTEGER;
VAR loc: Point); OVERRIDE;
æFi UPrinting.p
æT METHOD
æC LocatePageInterior determines the view coordinates of the top-left corner of a
printed page that corresponds to the TStdPrintHandler object’s associated view.
The pageNumber parameter is the number of the page whose interior is to be
located. MacApp stores the resulting location in the loc parameter. MacApp calls
LocatePageInterior when it must specify the area of a view that is to be printed
on a page. You usually do not need to call this method yourself.
æKY TStdPrintHandler.MaxPageNumber
æD FUNCTION TStdPrintHandler.MaxPageNumber: INTEGER; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC MaxPageNumber returns the largest page number that could be reasonably printed,
given the properties of the view. The resulting value may not necessarily be as
large as the actual number of pages if the view to be printed is very
large—for example, spreadsheets can occupy more area than could reasonably be printed.
MacApp calls MaxPageNumber when it prepares to print a view. You usually do not
need to call this method yourself.
æKY TStdPrintHandler.OneSubJob
æD FUNCTION TStdPrintHandler.OneSubJob(subjobFirstPage, subjobLastPage: INTEGER;
justSpool: BOOLEAN; partialJob: BOOLEAN; VAR ranOutOfSpace: BOOLEAN;
VAR lastPageTried: INTEGER; VAR proceed: BOOLEAN): TCommand;
æFi UPrinting.p
æT METHOD
æC OneSubJob prints one subjob, where the subjob consists of the pages specified by
the values of subjobFirstPage and subjobLastPage. To print an entire document,
it may be necessary to break it into subjobs if spooled printing is in effect
and there isn’t enough disk space to spool the entire document. MacApp prints
each subjob by calling the Printing Manager routine PrOpenDoc, printing the
required pages, and calling PrCloseDoc. For spooled jobs, each page is printed as
many times as is required by the job. For unspooled jobs, each page is printed
once and the printer itself reproduces the copies if needed. MacApp stores TRUE
in ranOutOfSpace if OneSubJob has run out of disk space while spooling pages.
In that case, lastPageTried is the page in which OneSubJob ran out of space.
MacApp stores FALSE in proceed if the user cancels the job, or if an error occurs
causing the job to be terminated. MacApp calls OneSubJob from
TStdPrintHandler.Print. You usually do not need to call this method yourself.
æKY TStdPrintHandler.OpenPrintShop
æD PROCEDURE TStdPrintHandler.OpenPrintShop;
æFi UPrinting.p
æT METHOD
æC OpenPrintShop activates the Printing Manager. MacApp calls OpenPrintShop from
TStdPrintHandler.DoInMacPrint. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.PageToStrip
æD FUNCTION TStdPrintHandler.PageToStrip(pageNumber: INTEGER); Point;
æFi UPrinting.p
æT METHOD
æC PageToStrip returns the horizontal and vertical page strip for the specified
page number. The page strip is the numbered row or column of pages in a document
that contains the specified page. The horizontal and vertical strip numbers are
returned as the horizontal and vertical coordinates of a point. The pageNumber
parameter is the number of the page whose strips are to be located. MacApp
calls PageToStrip from TStdPrintHandler.SetPage. You usually do not need to call
this method yourself, but you can use it if you need to determine the page strips
of a specific page.
æKY TStdPrintHandler.PointToPageStrip
æD FUNCTION TStdPrintHandler.PointToPageStrip(pointInView: VPoint): Point;
æFi UPrinting.p
æT METHOD
æC PointToPageStrip returns the horizontal and vertical page strip for the view point.
The page strip is the numbered row or column of pages in a document that
contains the specified point. The horizontal and vertical strip numbers are returned
as the horizontal and vertical coordinates of a point. The pointInView parameter
is the view point whose strips are to be located. You can use PointToPageStrip
when you need to determine the page strips in which a particular view point occurs.
æKY TStdPrintHandler.PoseJobDialog
æD FUNCTION TStdPrintHandler.PoseJobDialog: BOOLEAN;
æFi UPrinting.p
æT METHOD
æC PoseJobDialog displays the job dialog box by calling the Toolbox routine
PrJobDialog. If the user confirms the dialog, PoseJobDialog returns TRUE. If the user
cancelled the dialog, PoseJobDialog returns FALSE. MacApp calls PoseJobDialog
from methods that start the printing process. You usually do not need to call
this method yourself.
æKY TStdPrintHandler.PosePageSetupDialog
æD FUNCTION TStdPrintHandler.PosePageSetupDialog(VAR proceed: BOOLEAN;
isUndoable: BOOLEAN): TCommand;
æFi UPrinting.p
æT METHOD
æC PosePageSetupDialog displays the Page Setup dialog box. MacApp sets the proceed
parameter to the result returned from the dialog box. If isUndoable is set to
TRUE, then a TPrintStyleChangeCommand object is created so that changes made in
the dialog box will be undoable, and this command object is returned as the
method’s result. Otherwise, PosePageSetupDialog returns NIL. MacApp calls
PosePageSetupDialog from methods that start the printing process. You usually do not
need to call this method yourself.
æKY TStdPrintHandler.PosePrintDialog
æD PROCEDURE TStdPrintHandler.PosePrintDialog;
æFi UPrinting.p
æT METHOD
æC PosePrintDialog displays the “Printing in progress” dialog box and leaves it on
the screen. The standard printing dialog resources are in the resource file
Printing.r. Their resource IDs are phFinderPrintDialog and phSpoolPrintDialog.
MacApp uses the phFinderPrintDialog dialog box when printing from the Finder. This
dialog box has a Cancel button for canceling the current job, and a Cancel All
button for canceling the current and subsequent jobs. MacApp uses the
phSpoolPrintDialog in all other cases. This dialog box has only a Cancel button. The
printing dialog box is removed from the screen by TStdPrintHandler.BanishPrintDialog.
You usually do not need to call this method yourself.
æKY TStdPrintHandler.Print
æD FUNCTION TStdPrintHandler.Print(itsCmdNumber: CmdNumber;
VAR proceed: BOOLEAN): TCommand; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Print handles a request to print the contents of the TStdPrintHandler’s
associated view and returns a TCommand object to handle printing. The itsCmdNumber
parameter is a command number that specifies how the printing is to be done. MacApp
defines several predefined command numbers for printing from the File menu.
These predefined command numbers include the following: cPrFileBase (= 176)
cPrFileMax (= 195) ( Note: Command numbers between cPrFileBase and cPrFileMax are
sent to a document's fDocPrintHandler even if it is not in the fTarget chain.)
cPageSetup (Page Setup) cPrintOne(Print One) cPrint(Print) cPrintToFile(Print to
File) cPrintSpoolFile(Print Spooled File) cPrViewBase (= 201) cPrViewMax (=
250) (Note: Command numbers between cPrViewBase and cPrViewMax are printing
commands applied to a displayed view in the fTarget chain.) cShowBorders (Show View
Borders). The proceed parameter is a flag that is set to TRUE when MacApp
determines that it is okay to print. MacApp calls Print to print the contents of the
TStdPrintHandler’s associated view. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.PrinterChanged
æD PROCEDURE TStdPrintHandler.PrinterChanged; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC PrinterChanged forces repagination of the view awaiting printing to reflect new
printer-configuration information. MacApp calls PrinterChanged when it
determines that printer-configuration information has changed. You usually do not need
to call this method yourself.
æKY TStdPrintHandler.PrintPage
æD PROCEDURE TStdPrintHandler.PrintPage (aPageNumber: INTEGER);
æFi UPrinting.p
æT METHOD
æC PrintPage prints a single page of the TStdPrintHandler object’s associated
document. The aPageNumber parameter is the number of the page to be printed. MacApp
calls PrintPage when performing spooled printing. You can use this method
whenever you need to print a single page of a document.
æKY TStdPrintHandler.PrintSpoolFile
æD PROCEDURE TStdPrintHandler.PrintSpoolFile(anHPrint: Handle; VAR err: OSErr;
VAR proceed: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC PrintSpoolFile prints an image that was spooled by the print driver. The
anHPrint parameter specifies the handle of the image to be printed. The err parameter
specifies the error number to be generated if the spooling fails. The proceed
parameter must be set to TRUE for the method to operate. MacApp calls this
method when the user attempts to print a spooled file. You usually do not need to
call this method.
æKY TStdPrintHandler.RedoPageBreaks
æD PROCEDURE TStdPrinthandler.RedoPageBreaks; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC RedoPageBreaks recalculates the locations of page breaks in the TStdPrintHandler
object’s associated view. MacApp calls RedoPageBreaks from TView.DoPagination.
You usually do not need to call this method yourself, although you can call it
to ensure that the view’s page breaks are correct.
æKY TStdPrintHandler.Reset
æD PROCEDURE TStdPrintHandler.Reset; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC Reset changes the state of the print handler to use its default values. MacApp
calls Reset from methods that restore the TStdPrintHandler object’s default
settings. You can use this method in a similar fashion.
æKY TStdPrintHandler.SetDefaultPrintInfo
æD PROCEDURE TStdPrintHandler.SetDefaultPrintInfo; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC SetDefaultPrintInfo creates a PrintInfo record and initializes it to default
values. MacApp calls SetDefaultPrintInfo from methods that establish a default
state for the TStdPrintHandler object, such as IPrintHandler. The default version
is an empty method. TStdPrintHandler subclasses must override this method to
provide useful behavior.
æKY TStdPrintHandler.SetMargins
æD PROCEDURE TStdPrintHandler.SetMargins;
æFi UPrinting.p
æT METHOD
æC SetMargins resets the printing margins of the TStdPrintHandler object’s
associated view to those specified by the value of fPageAreas.theMargins. MacApp calls
SetMargins when recalculating page breaks. You can use this method to ensure
that the margin settings are current.
æKY TStdPrintHandler.SetPage
æD PROCEDURE TStdPrintHandler.SetPage(aPageNumber: INTEGER);
æFi UPrinting.p
æT METHOD
æC SetPage sets up the TStdPrintHandler object to print the specified page of the
object’s associated document. This method determines the horizontal and vertical
page breaks that define the page to be printed. The aPageNumber parameter is
the number of the page to be printed. MacApp calls SetPage from
TStdPrintHandler.PrintPage. You usually do not need to call this method yourself.
æKY TStdPrintHandler.SetPageInterior
æD PROCEDURE TStdPrintHandler.SetPageInterior(pageNumber: INTEGER): OVERRIDE;
æFi UPrinting.p
æT METHOD
æC SetPageInterior creates the margin around the image that is to be printed. The
image is the portion of the TStdPrintHandler object’s associated view that will
be printed. The pageNumber parameter specifies the page of the view that is to
be printed. MacApp calls SetPageInterior when it creates the page image that it
will send to the printer. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.SetPageOffset
æD PROCEDURE TStdPrintHandler.SetPageOffset(coord: VPoint): OVERRIDE;
æFi UPrinting.p
æT METHOD
æC SetPageOffset sets the value of the global variable gPageOffset to the specified
value.The global variable gPageOffset defines the top-left corner, in view
coordinates, of a page to be printed from the TStdPrintHandler object’s associated
view. The coord parameter is the view point that will become the top-left
corner of the page. MacApp calls SetPageOffset from TView.DoSetPageOffset when the
view is about to be printed. You usually do not need to call this method
yourself.
æKY TStdPrintHandler.SetPrintExtent
æD PROCEDURE TStdPrintHandler.SetPrintExtent;
æFi UPrinting.p
æT METHOD
æC SetPrintExtent calls the GetPrintExtent method of the TStdPrintHandler object’s
associated view to specify the portion of the view that is to be printed.
MacApp calls SetPrintExtent from methods that start the printing process or display
on the screen the image that is to be printed. You usually do not need to call
this method yourself. Do not override SetPrintExtent.
æKY TStdPrintHandler.SetupForFinder
æD FUNCTION TStdPrintHandler.SetupForFinder: BOOLEAN; OVERRIDE;
æFi UPrinting.p
æT METHOD
æC SetupForFinder sets up the TStdPrintHandler object for printing from the Finder.
MacApp calls SetupForFinder when the user has selected a document created by
the application and then chosen the Print command from the Finder’s File menu.
You usually do not need to call this method yourself.
æKY TStdPrintHandler.SetupPrintOne
æD FUNCTION TStdPrinthandler.SetupPrintOne: BOOLEAN;
æFi UPrinting.p
æT METHOD
æC SetupPrintOne sets up the TStdPrintHandler to print one copy of the document. It
does not use a job dialog box; instead, it simply validates the print
handler’s print record and prints the entire contents of the document. MacApp calls
SetupPrintOne from methods that handle the user’s printing requests. You usually
do not need to call this method yourself.
æKY TStdPrintHandler.ShowDocBeingPrinted
æD PROCEDURE TStdPrintHandler.ShowDocBeingPrinted(entering: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC ShowDocBeingPrinted creates or disposes of an invisible dialog box used by the
Printing Manager to get the title of the document being printed. MacApp sets the
title of the document to the title returned by GetDocName. If the entering
parameter is set to TRUE, then ShowDocBeingPrinted creates the dialog box; if it
is set to FALSE, then the method disposes of the dialog box. MacApp calls
ShowDocBeingPrinted when setting up to print from the Finder. You usually do not need
to call this method yourself.
æKY TStdPrintHandler.ShowsOnScreen
æD FUNCTION TStdPrintHandler.ShowsOnScreen: BOOLEAN;
æFi UPrinting.p
æT METHOD
æC ShowsOnScreen returns TRUE only if the TStdPrintHandler object has an associated
view that is in an active window. MacApp calls ShowsOnScreen when it must
determine whether a TStdPrintHandler’s associated view is currently displayed on
the screen. You can use it for the same purpose.
æKY TStdPrintHandler.StripToPage
æD FUNCTION TStdPrintHandler.StripToPage(hStrip, vStrip: INTEGER): INTEGER;
æFi UPrinting.p
æT METHOD
æC StripToPage returns the page number for the specified horizontal and vertical
page strips. Page strips are the numbered rows and columns of pages that make up
the whole printable area of a view. The hStrip parameter is the number of the
horizontal strip, and the vStrip parameter is the number of the vertical strip,
of the page to be identified. MacApp calls StripToPage when it must determine
the page defined by a particular hroizontal and vertical page strip. You can use
this method for the same purpose.
æKY TStdPrintHandler.ValidatePrintRecord
æD PROCEDURE TStdPrintHandler.ValidatePrintRecord (VAR didChange: BOOLEAN);
æFi UPrinting.p
æT METHOD
æC ValidatePrintRecord determines whether the information in the print record for
the TStdPrintHandler object’s associated view is compatible with the user's
current printer choice. If the record is valid, the function returns FALSE (no
change); if invalid, the record is adjusted to the default values stored in the
printer resource file, and the function returns TRUE. MacApp stores TRUE in the
didChange parameter if the print record has changed; otherwise, it stores FALSE.
MacApp calls ValidatePrintRecord from a variety of methods that prepare for
printing. You can use this method whenever you need to determine whether a print
record has changed.
æKY TTECommand.BanishOldText
æD PROCEDURE TTECommand.BanishOldText;
æFi UTEView.p
æT METHOD
æC BanishOldText checks if the selection is valid and then removes the text that is
being cut or replaced. BanishOldText is called by TTECommand.DoMainFunction
when the user cuts or pastes text. You never need to call it if you are satisfied
with the default text-editing facilities provided in MacApp.
æKY TTECommand.DoIt
æD PROCEDURE TTECommand.DoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoIt focuses the view, then calls TTECommand.DoMainFunction to remove the
selection, install the new text, and, if appropriate, redraw the view. MacApp
overrides this method from all subclasses of TTECommand except TTEPasteCommand. MacApp
calls this method when the user changes the text in a standard or
application-specific manner. For example, MacApp calls this method if the user cut,
copies, or pastes text into a TTEView view. You rarely need to call DoIt yourself,
although you can do so from an override of the TTECommand.RedoIt method.
æKY TTECommand.DoMainFunction
æD PROCEDURE TTECommand.DoMainFunction;
æFi UTEView.p
æT METHOD
æC DoMainFunction installs the new text in a selection, removing the old text if
the operation is a cut or paste. DoMainFunction also redraws the view if the
command just executed was not a copy command. DoMainFunction is called by
TTECommand.DoIt, TTECommand.RedoIt, and TTECutCopyCommand.DoIt to do the actual cut or
copy operation on a selection; you can use it for the same purpose when editing
text in TTEView views. You will rarely need to call it yourself if you are
satisfied with the default text-editing facilities of MacApp.
æKY TTECommand.Fields
æD PROCEDURE TTECommand.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTECommand object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TTECommand
object, performing DoToField on each one. The fieldName parameter is the name
of the field. The fieldAddr parameter is the field’s location in memory. The
fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp Inspector. You
must override this method in your subclasses if you want the Inspector to
display your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TTECommand.Free
æD PROCEDURE TTECommand.Free; OVERRIDE;
æFi UTEView.p
æT METHOD
æC Free disposes of the text handles holding information needed for Undo and Redo,
then frees SELF by calling INHERITED Free. MacApp calls Free to dispose of
command objects when they are no longer needed; for example, Free is called by
TApplication.PerformCommand after the command has been handled.
TApplication.CommitLastCommand also calls it after the user chooses another complex
command. (In MacApp, a “complex command” is one that changes the document and can be
undone, or one that requires mouse tracking.) You usually do not need to call this
method yourself.
æKY TTECommand.InstallNewText
æD PROCEDURE TTECommand.InstallNewText;
æFi UTEView.p
æT METHOD
æC InstallNewText is called by TTECommand.DoMainFunction in the DoIt and RedoIt
phases of cut or paste commands. You can call this method to install styled or
nonstyled text in a TTEView view.
æKY TTECommand.ITECommand
æD PROCEDURE TTECommand.ITECommand(itsTEView: TTEView; itsCmdNumber: CmdNumber;
itsSaveText: BOOLEAN);
æFi UTEView.p
æT METHOD
æC ITECommand initializes the command object, associating it with a TEView and a
command number. It also initializes the instance variables used by the
TTECommand.DoIt, UndoIt, and RedoIt; if unsuccessful, this method terminates through
the Failure mechanism. The itsTEView parameter is the TTEView associated with this
command. The itsCmdNumber parameter is the command number that is associated
with a particular menu command. The command number is used in the 'cmnu' resource
in the resource description file; you usually define a constant to represent
that number in both the resource description file and in the appropriate
interface or implementation file of the application. The itsSaveText parameter is set
to FALSE by TTEStyleCommand.ITECommand, and TRUE by the ITECommand methods in
its other subclasses. ITECommand is called by the initialization method of each
of its subclasses: TTECutCopyCommand.ITECutCopyCommand,
TTEPasteCommand.ITEPasteCommand, TTEStyleCommand.ITEStyleCommand, and
TTETypingCommand.ITETypingCommand all use this inherited method to perform a common
set of initialization tasks on newly created command objects. In addition,
TTEView.DoMakeEditCommand calls TTECommand.ITECommand for this purpose. You can call
ITECommand to initialize the fields of an instance of TTECommand if you make your own
subclass of TTECommand.
æKY TTECommand.RedoIt
æD PROCEDURE TTECommand.RedoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC RedoIt restores the selection to its state prior to the execution of Undo,
removes the selection, and installs the new text. MacApp calls RedoIt when the user
chooses Redo from the Edit menu to redo a Cut, Copy, Paste, or Clear command
and sometimes to redo typed characters. You can call RedoIt from
TYourTTECommand.RedoIt.
æKY TTECommand.RemoveAdditions
æD PROCEDURE TTECommand.RemoveAdditions;
æFi UTEView.p
æT METHOD
æC RemoveAdditions removes characters added by TTECommand.DoIt. RemoveAdditions is
called by TTECommand.UndoIt to remove characters added to a TTEView view by
TTECommand.DoIt. You can call this method yourself to do the same; however, you
usually do not need to unless you modify the text-editing features of MacApp.
æKY TTECommand.RestoreSelection
æD PROCEDURE TTECommand.RestoreSelection;
æFi UTEView.p
æT METHOD
æC RestoreSelection sets the selection to what it was just before the DoIt phase of
the command was performed. RestoreSelection is called by TTECommand.RedoIt,
TTECommand.UndoIt, TTEStyleCommand.RedoIt, and TTEStyleCommand.UndoIt. You can
call it to restore the selection in a TTEView view to its state prior to the
execution of the last Undo or Redo command.
æKY TTECommand.ReviveDeletions
æD PROCEDURE TTECommand.ReviveDeletions;
æFi UTEView.p
æT METHOD
æC ReviveDeletions reinserts the characters removed by TTECommand.DoIt.
ReviveDeletions is called by TTECommand.UndoIt after it focuses the view and restores
the selection appropriately. You can call this method yourself to reinsert
characters in a TTEView view that were removed in the DoIt phase of the command.
æKY TTECommand.UndoIt
æD PROCEDURE TTECommand.UndoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC UndoIt first focuses the view, then calls RemoveAdditions, ReviveDeletions, and
RestoreSelection to undo the last command. If the command being undone is Cut,
Clear, Paste, a style command, or typing, this method also redraws the view.
MacApp calls this method when the user selects the Undo item from the Edit menu.
You never need to call UndoIt yourself.
æKY TTECutCopyCommand.DoIt
æD PROCEDURE TTECutCopyCommand.DoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoIt creates a new TTEView view that will become the Clipboard view, and then
calls DoMainFunction, which does the actual cut or copy. MacApp calls this method
when the user chooses the Cut item or the Copy item from the application's
File menu. You never need to call DoIt yourself.
æKY TTECutCopyCommand.Fields
æD PROCEDURE TTECutCopyCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTECutCopyCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TTECutCopyCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the fields from superclasses are also displayed.
æKY TTECutCopyCommand.Free
æD PROCEDURE TTECutCopyCommand.Free; OVERRIDE;
æFi UTEView.p
æT METHOD
æC Free releases the memory used by the command object and associated data
structures by calling INHERITED Free. MacApp calls Free to dispose of command objects
when they are no longer needed; for example, Free is called by
TApplication.PerformCommand after the command has been handled.
TApplication.CommitLastCommand also calls it after the user chooses another complex
command. (In MacApp, a “complex command” is one that changes the document and can be
undone, or one that requires mouse tracking.) You usually do not need to call this
method yourself.
æKY TTECutCopyCommand.ITECutCopyCommand
æD PROCEDURE TTECutCopyCommand.ITECutCopyCommand(itsTEView: TTEView;
itsCmdNumber: CmdNumber);
æFi UTEView.p
æT METHOD
æC ITECutCopyCommand initializes fields particular to TTECutCopyCommand objects and
calls its inherited method, TCommand.ITECommand, to initialize the rest of the
fields that a TTECutCopyCommand object inherits from TTECommand. The itsTEView
parameter is the TTEView that is affected by this command. The itsCmdNumber
parameter is the command number that is associated with a particular menu
command. The command number is used in the 'cmnu' resource in the resource description
file; you usually define a constant to represent that number in both the
resource description file and in the appropriate interface or implementation file of
the application. TTEView.DoMakeEditCommand calls ITECutCopyCommand to
initialize a command object and pass it to TApplication.PerformCommand, which handles
the command. You can call ITECutCopyCommand to initialize TTECutCopyCommand objects.
æKY TTECutCopyCommand.ReviveDeletions
æD PROCEDURE TTECutCopyCommand.ReviveDeletions; OVERRIDE;
æFi UTEView.p
æT METHOD
æC ReviveDeletions reinserts the characters removed by a Cut command. The
ReviveDeletions method checks the variable fCmdNumber to make sure the command is
indeed a Cut command and then simply calls its INHERITED ReviveDeletions method.
ReviveDeletions is called by TTECommand.UndoIt after UndoIt focuses the view and
removes the added text. You probably will not need to call ReviveDeletions,
although you can do so to reinsert characters in its associated TTEView that were
removed in the DoIt phase of the command.
æKY TTEPasteCommand.Fields
æD PROCEDURE TTEPasteCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTEPasteCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TTEPasteCommand object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what type
of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TTEPasteCommand.ITEPasteCommand
æD PROCEDURE TTEPasteCommand.ITEPasteCommand(itsTEView: TTEView);
æFi UTEView.p
æT METHOD
æC ITEPasteCommand initializes a command object used to paste Clipboard data,
associating it with a TTEView view and a command number. The itsTEView parameter is
the TTEView view associated with the command. ITEPasteCommand is called by
TTEView.DoMakeEditCommand when the user selects the Paste command for a TTEView
view. You can call ITEPasteCommand to initialize TTEPasteCommand objects.
æKY TTEStyleCommand.DoIt
æD PROCEDURE TTEStyleCommand.DoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoIt applies a single style to a selection range. MacApp calls this method when
the user selects the appropriate style command defined by your application in
TTEView.DoMenuCommand. You never need to call DoIt yourself.
æKY TTEStyleCommand.Fields
æD PROCEDURE TTEStyleCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTEStyleCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TTEStyleCommand object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what type
of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TTEStyleCommand.InstallManyStyles
æD PROCEDURE TTEStyleCommand.InstallManyStyles(newStyls: StScrpHandle);
æFi UTEView.p
æT METHOD
æC InstallManyStyles applies multiple text styles to a selection. The newStyls
parameter is a handle to the style scrap. The style scrap is a record containing
the style data for the current selection. MacApp calls this method from
TTEStyleCommand.UndoIt to restore the original styles to a text selection. You can
call InstallManyStyles to apply multiple styles to a text selection.
æKY TTEStyleCommand.InstallOneStyle
æD PROCEDURE TTEStyleCommand.InstallOneStyle(newStyl: TextStyle);
æFi UTEView.p
æT METHOD
æC InstallOneStyle applies one text style to a selection. The newStyl parameter is
a handle to the style scrap. The style scrap is a record containing the style
data for the current selection. InstallOneStyle is called by
TTEStyleCommand.DoIt and TTEStyleCommand.UndoIt. You can call it to apply a single
text style to a text selection in a TTEView view.
æKY TTEStyleCommand.ITEStyleCommand
æD PROCEDURE TTEStyleCommand.ITEStyleCommand(itsTEView: TTEView;
itsNewStyle: TextStyle; itsCmdNumber: CmdNumber; itsMode: INTEGER);
æFi UTEView.p
æT METHOD
æC ITEStyleCommand initializes the command; if it is unsuccessful, the Failure
mechanism signals an error. The itsTEView parameter associates the command with a
TTEView view. The itsNewStyle parameter specifies the style to apply to the
current text selection. The itsCmdNumber parameter is a user-defined command number
assigned to each command in a menu. Command numbers are defined in the
application's resource description file and in the TTEYourView.DoMenuCommand method.
The itsMode parameter indicates the type of style change to make to the text, as
follows: doFont = 1 doFace = 2 doSize = 4 doColor = 8 doAll = 15 MacApp calls
this method when the user selects the appropriate style command from the menu.
You don't call ITEStyleCommand yourself; instead, you create a TTEStyle command
in your DoMenuCommand method by calling DoMakeStyle command, which creates,
initializes, and returns the style command.
æKY TTEStyleCommand.RedoIt
æD PROCEDURE TTEStyleCommand.RedoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC RedoIt restores the selection to its state before the last UndoIt was executed
and then calls TTEStyleCommand.DoIt to restore the text style to that selection.
MacApp calls this method when the user chooses the Redo item from the Edit
menu. You never need to call RedoIt yourself.
æKY TTEStyleCommand.UndoIt
æD PROCEDURE TTEStyleCommand.UndoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC UndoIt removes the style changes caused by the last DoIt, restores the previous
selection, and installs any styles that were present in the selection before
DoIt was called. MacApp calls this method when the user chooses the Undo item
from the Edit menu. You never need to call UndoIt yourself.
æKY TTETypingCommand.AddCharacter
æD PROCEDURE TTETypingCommand.AddCharacter(aChar: Char);
æFi UTEView.p
æT METHOD
æC The AddCharacter method adds another character to an existing TTETypingCommand
object. AddCharacter calls the following TTETypingCommand methods: DoNormalChar,
which adds a character to the text record; BkSpcRight, which deletes a
character to the right of the original selection; BkSpcLeft, which deletes a character
to the left of the original selection; and FwdDelete, which deletes one or
more characters appearing after the current text insertion point. The aChar
parameter is the character being added. AddCharacter is called by
TTETypingCommand.DoIt when the user types the first character of a text sequence in a
TTEView view. The AddCharacter method is also called by TTEView.DoKeyCommand when the
user types additional characters (that is, if a typing command already exists,
DoKeyCommand calls AddCharacter directly).
æKY TTETypingCommand.BkSpcLeft
æD PROCEDURE TTETypingCommand.BkSpcLeft(theText: Handle; curStart: INTEGER);
æFi UTEView.p
æT METHOD
æC BkSpcLeft handles keystrokes that backspace to the left of the original
selection. The parameter theText is a handle to the text being edited. The curStart
parameter is an integer specifying the starting location of the text insertion
point. TTETypingCommand.AddCharacter calls BkSpcLeft when the user types a
standard backspace—that is, one that moves the insertion point to the left. You
usually do not call BkSpcLeft if you do not modify the text-editing facilities in
MacApp. (Note: MacApp assumes no character will ever be longer than 4 bytes,
allowing it to work in scripts having up to four billion characters.)
æKY TTETypingCommand.BkSpcRight
æD PROCEDURE TTETypingCommand.BkSpcRight(theText: Handle; curStart: INTEGER);
æFi UTEView.p
æT METHOD
æC BkSpcRight handles keystrokes that backspace to the right of the original
selection. The parameter theText is a handle to the text being edited. The curStart
parameter is an integer specifying the starting location of the text insertion
point. BkSpcRight is called by TTETypingCommand.AddCharacter when the user
backspaces to the right of the original selection. You probably will not need to
call this method.
æKY TTETypingCommand.CompleteTyping
æD PROCEDURE TTETypingCommand.CompleteTyping;
æFi UTEView.p
æT METHOD
æC CompleteTyping marks the selection as allowing no more typing and updates the
style scrap, if any. TTEView.DoneTyping calls TTETypingCommand.CompleteTyping
after it checks that the value of fTypingCommand is not set to NIL. MacApp
considers keystrokes to be commands, just like menu commands and mouse commands; thus,
MacApp calls TTEView.DoneTyping before the execution of further commands that
affect a TTEView view. DoneTyping is called from the TTEView methods
DoKeyCommand, DoMenuCommand, DoMouseCommand, BeInPort, and InstallSelection. The
DoKeyCommand method calls DoneTyping as each keystroke is handled. DoMenuCommand, and
DoMouseCommand also call it prior to handling other commands. BeInPort and
InstallSelection call it to stabilize the view before focusing and installing a
selection. You usually call TTEView.DoneTyping rather than calling CompleteTyping
directly when you need to mark a TTEView view as allowing no more typing.
æKY TTETypingCommand.DoIt
æD PROCEDURE TTETypingCommand.DoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoIt simply calls AddCharacter. MacApp calls this method in response to a user
command. (Remember that in MacApp, keystrokes are considered commands.) MacApp
may also call DoIt as part of a TTETypingCommand.RedoIt method. You do not need
to call DoIt unless you modify the text-editing facilities in MacApp.
æKY TTETypingCommand.DoNormalChar
æD PROCEDURE TTETypingCommand.DoNormalChar(aChar: Char);
æFi UTEView.p
æT METHOD
æC DoNormalChar handles any typed character except a backspace. The aChar parameter
represents the keystroke the user typed. DoNormalChar is called by
TTETypingCommand.AddCharacter. Because MacApp intercepts keystrokes and dispatches
them appropriately, you usually do not call DoNormalChar yourself.
æKY TTETypingCommand.Fields
æD PROCEDURE TTETypingCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTETypingCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TTETypingCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TTETypingCommand.Free
æD PROCEDURE TTETypingCommand.Free; OVERRIDE;
æFi UTEView.p
æT METHOD
æC Free releases the memory used by the TTETypingCommand object and dependent
structures. If the value of fTEView.fTypingCommand is SELF, it sets this variable to
NIL. It then calls INHERITED Free. MacApp calls Free to dispose of command
objects when they are no longer needed; for example, Free is called by
TApplication.PerformCommand after the command has been handled.
TApplication.CommitLastCommand also calls it after the user chooses another complex
command. (In MacApp, a “complex command” is one that changes the document and can be
undone, or one that requires mouse tracking.) You usually do not need to call this
method yourself.
æKY TTETypingCommand.FwdDelete
æD PROCEDURE TTETypingCommand.FwdDelete(theText: Handle; curStart, curEnd: INTEGER);
æFi UTEView.p
æT METHOD
æC FwdDelete handles keystrokes that delete text appearing after the current
location of the text insertion point. The parameter theText is a handle to the text
being edited. The curStart parameter is the current location of the insertion
point. The curEnd parameter is the location of the insertion point after the edit
is complete. FwdDelete is called by TTETypingCommand.AddCharacter when the
user presses the Forward Delete key on the Apple Extended Keyboard. Because MacApp
intercepts keystrokes and dispatches them for you, you usually do not call the
FwdDelete method yourself.
æKY TTETypingCommand.ITETypingCommand
æD PROCEDURE TTETypingCommand.ITETypingCommand(itsTEView: TTEView; itsFirstChar: Char);
æFi UTEView.p
æT METHOD
æC TTETypingCommand.ITETypingCommand initializes a TTETypingCommand object; if not
successful, the Failure mechanism terminates the process with a message that
initialization failed. The itsTEView parameter associates the command with an
instance of a TTEView view. The itsFirstChar parameter stores the first character
the user typed; that character is passed to AddCharacter by the DoIt method.
ITETypingCommand is called by TTEView.DoMakeTypingCommand and
TTEView.DoKeyCommand when the user presses a key and a new command is needed. You can
call it to initialize new instances of TTETypingCommand.
æKY TTETypingCommand.RedoIt
æD PROCEDURE TTETypingCommand.RedoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC MacApp uses TTETypingCommand.RedoIt to redo a typing change. MacApp calls this
method when the user chooses the Redo item from the Edit menu. You never need to
call this method yourself.
æKY TTETypingCommand.UndoIt
æD PROCEDURE TTETypingCommand.UndoIt; OVERRIDE;
æFi UTEView.p
æT METHOD
æC TTETypingCommand.UndoIt restores the document to its state prior to the
execution of the last DoIt or RedoIt command. MacApp calls this method when the user
chooses the Undo item from the Edit menu. You never need to call this method
yourself.
æKY TTEView.AutoScrolling
æD PROCEDURE TTEView.AutoScrolling(doScrolling: BOOLEAN);
æFi UTEView.p
æT METHOD
æC AutoScrolling sets a flag that determines whether the TTEView object is capable
of automatic scrolling. If automatic scrolling is enabled, then typing or
dragging beyond the boundaries of the view causes scrolling of the view contents to
keep the insertion point visible. If the doScrolling parameter is set to TRUE,
automatic scrolling is enabled; if doScrolling is set to FALSE, automatic
scrolling is disabled. MacApp calls AutoScrolling from the global routine
AutoScrollTEView to enable automatic scrolling in the currently active TTEView object.
It also calls this method from TDialogView.MakeTEView so that the TTEView objects
in dialog boxes have automatic scrolling enabled. You can use AutoScrolling to
set the automatic scrolling flag for your TTEView objects.
æKY TTEView.BeInPort
æD PROCEDURE TTEView.BeInPort(itsPort: GrafPtr); OVERRIDE;
æFi UTEView.p
æT METHOD
æC BeInPort associates the TextEditRecord used by the TTEView object with the
specified grafPort. The itsPort parameter is the grafPort in which the TTEView
object will draw its text; the grafPort is used to support graphics or printing
operations on the TTEView object. MacApp calls BeInPort from methods that create
and initialize TTEView objects. You usually do not need to call this method
yourself.
æKY TTEView.BeInScroller
æD PROCEDURE TTEView.BeInScroller(itsScroller: TScroller); OVERRIDE;
æFi UTEView.p
æT METHOD
æC BeInScroller associates the TTEView object with a specified scroller and allows
MacApp to set the parameters that control scrolling in TTEView views. The
method uses the specified TScroller object to establish the necessary parameters.
The itsScroller parameter is the TScroller object used to set scrolling
parameters. MacApp calls BeInScroller from several methods that create and initialize
TTEView objects. You usually do not need to call this method yourself.
æKY TTEView.CalcMinSize
æD PROCEDURE TTEView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
æFi UTEView.p
æT METHOD
æC CalcMinSize calculates the minimum dimensions of the TTEView object. The minSize
parameter contains the calculated size, represented as a view point, when the
method returns. MacApp calls CalcMinSize from methods that adjust the size of
the TTEView object. You usually do not need to call this method yourself, but
you can use it to determine the smallest rectangle the view can occupy.
æKY TTEView.CalcRealHeight
æD FUNCTION TTEView.CalcRealHeight: LONGINT;
æFi UTEView.p
æT METHOD
æC CalcRealHeight returns the height of the text displayed by the TTEView object.
If the last character is a carriage return, then CalcRealHeight includes an
extra blank line in its height calculation. MacApp calls CalcRealHeight from
TTEView.CalcMinSize and from other methods that must determine the vertical dimension
of a TTEView object. You usually do not need to call this method yourself, but
you can use it if you must know the height of a text view.
æKY TTEView.CalcRealWidth
æD FUNCTION TTEView.CalcRealWidth: LONGINT;
æFi UTEView.p
æT METHOD
æC This method calculates the true width of a TextEdit record. In MacApp 2.0, the
method is supported only for TextEdit records that are not styled.
æKY TTEView.CalcSelLoc
æD PROCEDURE TTEView.CalcSelLoc(VAR selectionRect: Rect);
æFi UTEView.p
æT METHOD
æC CalcSelLoc computes a rectangle that contains the current text selection. The
method stores the computed rectangle in the selectionRect parameter. MacApp calls
CalcSelLoc from TTEView.ScrollSelectionIntoView. You can use this method when
you need to determine the location of the selected text in a TTEView object.
æKY TTEView.ChangeWrap
æD PROCEDURE TTEView.ChangeWrap(newAutoWrap, redraw: BOOLEAN);
æFi UTEView.p
æT METHOD
æC ChangeWrap sets the wrapping behavior of the TTEView object according to the
specified value. If newAutoWrap is set to TRUE, then the TTEView object will wrap
text if necessary to prevent a line from extending farther than the right edge
of the view. If newAutoWrap is set to FALSE, then the TTEView object will
permit text lines to be longer than the width of the view, wrapping to a new line
only at carriage returns. If the value of redraw is TRUE, then the TTEView object
redraws the view; otherwise, it does not. MacApp calls ChangeWrap from
TTEView.MakeTERecord. You can use this method to control the wrapping behavior of text
views.
æKY TTEView.ClikLoop
æD FUNCTION TTEView.ClikLoop: BOOLEAN;
æFi UTEView.p
æT METHOD
æC ClikLoop is called by the global routine ClickLoopForTTEView. The default
version automatically handles automatic scrolling for the TTEView view. MacApp calls
this method when the user clicks in a TTEView view. You usually do not need to
call this method. You can override the method to take different actions when
the user clicks in the TTEView view.
æKY TTEView.ComputeSize
æD PROCEDURE TTEView.ComputeSize(VAR newSize: VPoint); OVERRIDE;
æFi UTEView.p
æT METHOD
æC ComputeSize computes a point that represents the horizontal and vertical
dimensions of the TTEView object. The method stores the computed point in the newSize
parameter. MacApp calls ComputeSize from methods that must use or adjust the
size of the TTEView object. You can use this method in a similar fashion.
æKY TTEView.ContainsClipType
æD FUNCTION TTEView.ContainsClipType(aType: ResType): BOOLEAN; OVERRIDE;
æFi UTEView.p
æT METHOD
æC ContainsClipType returns the value TRUE if the TTEView object can display data
of type 'TEXT'. The aType parameter is a resource type identifier that specifies
the type of data to be tested. MacApp calls ContainsClipType from the global
routine CanPaste when it must determine whether it can paste the contents of the
Clipboard into a particular view. You can use this method in a similar fashion.
æKY TTEView.ContinuousStyle
æD FUNCTION TTEView.ContinuousStyle(firstChar, lastChar: INTEGER; VAR mode: INTEGER;
VAR aStyle: TextStyle): BOOLEAN;
æFi UTEView.p
æT METHOD
æC ContinuousStyle returns the value TRUE if there is only one text style in the
specified range of characters. The firstChar and lastChar parameters specify the
first and last characters of the range that is to be checked. The mode
parameter specifies which style attributes are to be tested when the method is called.
The method stores any continuous styles in the aStyle parameter, and sets the
corresponding flags in mode. MacApp calls ContinuousStyle from several methods
that perform calculations using information about the text in a TTEView object.
æKY TTEView.DoBreakFollowing
æD FUNCTION TTEView.DoBreakFollowing(vhs: VHSelect; prevBreak: VCoordinate;
VAR automatic: BOOLEAN): VCoordinate; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoBreakFollowing returns the coordinates corresponding to the page break,
horizontal or vertical, that follows the specified page break. The vhs parameter
specifies whether the page break to be found is vertical or horizontal; a value of
v specifies that it is a vertical page break, and a value of h specifies that
it is horizontal. The prevBreak parameter specifies the coordinates
corresponding to the specified page break; DoBreakFollowing returns the page break
that occurs next after the one specified. The automatic parameter specifies whether
the page break that is to be located is an automatic page break. Automatic page
breaks are those whose position is computed automatically by the application
rather than fixed manually by the user. If automatic is set to TRUE, then MacApp
considers the page break to be automatic. MacApp calls DoBreakFollowing from
print-handling methods that must determine the locations of page breaks. You can
use this method when you need to calculate the location of a specified page break.
æKY TTEView.DoCalcViewPerPage
æD PROCEDURE TTEView.DoCalcViewPerPage(VAR viewPerPage: VPoint); OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoCalcViewPerPage calculates the portion of the view that will fit on a single
printed page. The method stores the calculated area as a view point in the
viewPerPage parameter. MacApp calls DoCalcViewPerPage from
TStdPrintHandler.RedoPageBreaks. You can use this method when you must determine what
portion of a view will fit on a printed page.
æKY TTEView.DoIdle
æD FUNCTION TTEView.DoIdle(phase: IdlePhase): BOOLEAN; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoIdle causes the text insertion point to blink. The default version of this
method always returns FALSE, indicating that the TTEView object did not free
itself. The phase parameter can have the values idleBegin, idleContinue, or idleEnd.
MacApp sets the value of the phase parameter to idleBegin when there are no
events to be handled in the event record; this value tells DoIdle to pass control
to the first handler in the idle chain. MacApp sets the value of the phase
parameter to idleContinue when the first cohandler in the chain has completed its
task and there still are no events posted in the event record; this value tells
DoIdle to pass control to the next cohandler in the chain. MacApp sets the
value of the phase parameter to idleEnd when an event is posted in the event
record; this value tells DoIdle to pass control to the command chain or click chain,
as appropriate. The default version of DoIdle ignores the phase parameter.
MacApp calls DoIdle from TApplication.Idle. You usually do not need to call this
method yourself; however, you can override DoIdle to provide additional
processing while the TTEView object is idle. Your override method should return TRUE
if the TTEView object frees itself.
æKY TTEView.DoKeyCommand
æD FUNCTION TTEView.DoKeyCommand(ch: Char; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoKeyCommand returns a TCommand object that handles keystrokes made without the
Command key pressed, when the TTEView object is the active view. If the command
requires no further processing, this method returns NIL. The ch parameter is
the alphanumeric character that corresponds to the key the user pressed. The
aKeyCode parameter is the ASCII key code generated by the keystroke. The info
parameter is the event record description of the event that caused MacApp to call
DoKeyCommand; the info parameter is used to pass information about the event,
such as whether the Option key was pressed. MacApp calls DoKeyCommand from
TApplication.HandleKeyDownEvent. You usually do not need to call this method
yourself. You can override this method in your TTEView subclasses if you need to
provide special behavior when keys are pressed.
æKY TTEView.DoMakeEditCommand
æD FUNCTION TTEView.DoMakeEditCommand(aCmdNumber: CmdNumber): TTECommand;
æFi UTEView.p
æT METHOD
æC DoMakeEditCommand returns a TCommand object to handle a user-generated editing
command. The aCmdNumber parameter is the command number that must be handled by
the newly created TCommand object. Usually the value of aCmdNumber is in the
range from cEditBase to cEditLast (see the MacApp globals documentation for an
explanation of these values). MacApp calls DoMakeEditCommand from
TTEView.DoMenuCommand. You usually do not need to call this method yourself. You can
override DoMakeEditCommand in TTEView subclasses to provide special handling of
editing commands.
æKY TTEView.DoMakeStyleCommand
æD FUNCTION TTEView.DoMakeStyleCommand(aStyle: TextStyle; itsCmdNumber: CmdNumber;
itsMode: INTEGER): TTEStyleCommand;
æFi UTEView.p
æT METHOD
æC DoMakeStyleCommand returns a newly created TCommand object to handle
user-generated style-change commands. The aStyle parameter is the new style that is to
be applied. The itsCmdNumber parameter is the number of the command that the new
TCommand object must handle. The itsMode parameter is the QuickDraw copy mode
that is to be applied to the affected text. You can call DoMakeStyleCommand from
event-handling code that must process style changes selected by the user. You
can override this method in TTEView subclasses to provide special style
handling.
æKY TTEView.DoMakeTypingCommand
æD FUNCTION TTEView.DoMakeTypingCommand(ch: Char): TTETypingCommand;
æFi UTEView.p
æT METHOD
æC DoMakeTypingCommand returns a newly created TCommand object to handle a user’s
keystroke. The ch parameter is the character corresponding to the key that the
user pressed. MacApp calls DoMakeTypingCommand from TTEView.DoKeyCommand. You
usually do not need to call this method yourself. You can override this method in
TTEView subclasses to provide special handling of keystrokes.
æKY TTEView.DoMenuCommand
æD FUNCTION TTEView.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoMenuCommand performs the appropriate actions to process a user’s menu
selection, handling simple commands directly and returning NIL, or returning a
TCommand object to handle commands that can be undone. The parameter aCmdNumber is
the command number defined for the selected menu item. MacApp predefines certain
command numbers as constants in the file UMacApp.p; you can define others in your
'cmnu' resource description and in the appropriate interface or implementation
file. MacApp calls DoMenuCommand when the user chooses a command from a menu.
You usually do not need to call this method yourself. You can override this
method in TTEView subclasses to implement special handling of menu commands.
æKY TTEView.DoMouseCommand
æD FUNCTION TTEView.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoMouseCommand terminates a typing command by calling TTEView.DoneTyping, which
in turn calls TTETypingCommand.CompleteTyping. DoMouseCommand returns NIL. The
parameter theMouse is the mouse pointer’s current location, described in view
coordinates. The info parameter is the event record of the mouse-down event that
caused DoMouseCommand to be called. The hysteresis parameter is a point that
represents the horizontal and vertical distance the mouse can travel between
clicks and still be considered to be at the same location. MacApp uses this
parameter to determine whether a double click has occurred or if a control has moved.
MacApp calls DoMouseCommand from a variety of methods that handle events in
views. You usually do not need to call DoMouseCommand yourself. You can override
this method in TTEView subclasses to provide special mouse-handling behavior.
æKY TTEView.DoneTyping
æD PROCEDURE TTEView.DoneTyping;
æFi UTEView.p
æT METHOD
æC DoneTyping informs the TCommand object currently handling typing that it will
receive no more keyboard events. MacApp calls DoneTyping from methods that change
the current event-handling context, such as TTEView.DoMouseCommand and
TTEView.InstallSelection. You usually do not need to call this method yourself.
æKY TTEView.DoSetCursor
æD FUNCTION TTEView.DoSetCursor(localPoint: Point;
cursorRgn: RgnHandle): BOOLEAN; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoSetCursor changes the appearance of the cursor to the image associated with
the view. The default version of DoSetCursor sets the cursor to the text
insertion (or I-beam) pointer and returns the value TRUE. The localPoint parameter is
the local QuickDraw point, expressed in view coordinates, representing the
location of the cursor. The cursorRgn parameter is the region that contains the
cursor image. MacApp calls DoSetCursor from TView.HandleCursor. You usually do not
need to call this method yourself. You can override DoSetCursor in TTEView
subclasses to show a special cursor image.
æKY TTEView.DoSetPageOffset
æD PROCEDURE TTEView.DoSetPageOffset(coord: VPoint); OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoSetPageOffset calculates the location of the top-left corner of the specified
printed page. The coord parameter is a point that represents the horizontal and
vertical displacement, in pages, of the specified page. MacApp calls
DoSetPageOffset from TStdPrintHandler.SetPage when about to print the contents of the
view. You usually do not need to call this method yourself.
æKY TTEView.DoSetupMenus
æD PROCEDURE TTEView.DoSetupMenus; OVERRIDE;
æFi UTEView.p
æT METHOD
æC DoSetupMenus enables and disables the Copy, Select All, Cut, and Clear items in
the application’s menus when the TTEView object becomes the active view. MacApp
calls DoSetupMenus from TApplication.SetupTheMenus, and from event-handling
methods that change the active view. You usually do not need to call this method
yourself. You must override this method in TTEView subclasses to enable and
disable the correct menu items when the TTEView object becomes the active view.
Your override must call INHERITED DoSetupMenus as its first action, to allow
other handlers to enable menu items to which they can respond.
æKY TTEView.Draw
æD PROCEDURE TTEView.Draw(area: Rect); OVERRIDE;
æFi UTEView.p
æT METHOD
æC This method draws the TTEView object’s text on the screen. The area parameter is
a QuickDraw rectangle, expressed in view coordinates, that defines part of the
control that needs to be redrawn. You use this parameter to optimize drawing
speed. MacApp calls Draw from TTEView.DrawContents. You usually do not need to
call this method yourself. You can override Draw in TTEView subclasses if you
need to draw the text in a special way.
æKY TTEView.ExtractStyles
æD PROCEDURE TTEView.ExtractStyles(VAR theStyles: TEStyleHandle;
VAR theElements: STHandle);
æFi UTEView.p
æT METHOD
æC ExtractStyles retrieves handles to the style data for a TextEdit record. MacApp
stores retrieved style data in the parameter theStyles, and stores retrieved
element information in the parameter theElement. You can call ExtractStyle to
obtain style data for a TextEdit record—for example, when you need to store it in
a file.
æKY TTEView.ExtractText
æD FUNCTION TTEView.ExtractText: Handle;
æFi UTEView.p
æT METHOD
æC ExtractText returns a handle to the text of the TTEView object. MacApp calls
ExtractText from TEditText.GetText. You can use this method when you need to
retrieve the text from a TTEView object—for example, when you need to store it in a
file.
æKY TTEView.Fields
æD PROCEDURE TTEView.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Fields reports the contents of each field of the TTEView object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TTEView
object, performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TTEView.Free
æD PROCEDURE TTEView.Free; OVERRIDE;
æFi UTEView.p
æT METHOD
æC Free releases the memory used by the TTEView object and its TextEdit record.
MacApp calls Free from a variety of methods that dispose of TTEView objects or of
objects that contain TTEView objects. You can call Free to release the memory
used by a TTEView object when you no longer need that object.
æKY TTEView.GetPrintExtent
æD PROCEDURE TTEView.GetPrintExtent(VAR printExtent: VRect); OVERRIDE;
æFi UTEView.p
æT METHOD
æC GetPrintExtent retrieves the area of the view that will be printed. This area is
the view’s total area minus its margin insets. The method stores the resulting
area in the printExtent parameter. MacApp calls GetPrintExtent from methods
that prepare a view for printing. You usually do not need to call this method
yourself, but you can use it if you need to determine what area of the view will
be printed.
æKY TTEView.GivePasteData
æD FUNCTION TTEView.GivePasteData(aDataHandle: Handle;
dataType: ResType): LONGINT; OVERRIDE;
æFi UTEView.p
æT METHOD
æC GivePasteData retrieves the text or the style data of the TTEView object and
stores it in the specified location, then returns the size, in bytes, of the
retrieved data. The aDataHandle parameter is a handle to a block of memory that will
contain the retrieved text or style data. The dataType parameter specifies
whether the method is to retrieve text or style data. If the value of dataType is
'TEXT' then the method retrieves the view’s text; if ist value is 'styl' then
the method retrieves style data. MacApp calls GivePasteData from
TApplication.GetDataToPaste and TTEPasteCommand.ITEPasteCommand. MacApp calls this
method to retrieve text and style data to be pasted from a TTEView object installed
in the Clipboard. You usually do not need to call this method yourself.
æKY TTEView.IdentifySoftware
æD PROCEDURE TTEView.IdentifySoftware; OVERRIDE;
æFi UTEView.p
æT METHOD
æC IdentifySoftware writes to the Debug Transcript window version information about
the UTEView unit and the date and time that the application was compiled; it
then calls INHERITED IdentifySoftware. MacApp calls IdentifySoftware from
TApplication.DoMenuCommand. You usually do not need to call IdentifySoftware
yourself. You can override this method to add further information to the debug
transcript.
æKY TTEView.InstallSelection
æD PROCEDURE TTEView.InstallSelection(wasActive, beActive: BOOLEAN); OVERRIDE;
æFi UTEView.p
æT METHOD
æC InstallSelection places the text insertion point and highlights any selected
text in the TTEView object when it becomes the active view. The wasActive
parameter specifies whether the TTEView was the active view before the call to
InstallSelection; if the value of wasActive is TRUE, then the view was active before
the call. The beActive parameter specifies whether the TTEView object will be the
active view after the call; if the value of beActive is TRUE, then the view
will be active. MacApp calls InstallSelection from methods that change the active
view in a window. You usually do not need to call this method yourself, but
you can use it to ensure that the selection in a TTEView object is correctly
highlighted.
æKY TTEView.IRes
æD PROCEDURE TTEView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UTEView.p
æT METHOD
æC IRes initializes a TTEView object from a 'view' resource template. The
itsDocument parameter specifies the TDocument object associated with the TTEView
object. The itsSuperView parameter specifies the TView object into which the view is
to be installed; for a TTEView object, this is usually a TWindow or TScroller
object. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes initializing
the view, the method moves the pointer to the end of this data. MacApp calls
this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. You never need
to call IRes yourself.
æKY TTEView.ITEView
æD PROCEDURE TTEView.ITEView(itsDocument: TDocument; itsSuperView: TView; itsLocation,
itsSize: VPoint; itsHDeterminer, itsVDeterminer: SizeDeterminer; itsInset: Rect;
itsTextStyle: TextStyle; itsJustification: INTEGER; itsStyleType,
itsAutoWrap: BOOLEAN);
æFi UTEView.p
æT METHOD
æC ITEView initializes a newly created TTEView object, assigning the specified
values to the appropriate fields. The itsDocument parameter is the TDocument object
with which the view will be associated. The itsSuperView parameter is the
TView object in which the TTEView object is installed. Usually the superview is a
TWindow or TScroller object. The itsLocation parameter is the view point that
defines the location of the view’s top-left corner in its superview. The itsSize
parameter is a view point that specifies the view’s horizontal and vertical
dimensions in pixels. The itsHDeterminer and itsVDeterminer parameters determine
how the view’s horizontal and vertical dimensions are calculated, respectively.
Allowed values include sizeSuperView (the view is the same size as its
superview), sizeRelSuperView (the view size is relative to the superview’s size),
sizePage (the view is the size of one page), sizeFillPages (the view expands to fill
an exact number of pages), sizeVariable (the view size fluctuates according to
application-specific criteria), and sizeFixed (the size is fixed at the time
the view is created). The itsInset parameter specifies the width of the four
margins around the view. The value is a Rect record, and each of its fields—top,
left, bottom, and right—specifies the size of the corresponding margin. The
itsTextStyle parameter is a TextStyle record that specifies the style of the text
displayed in the view. The itsJustification parameter specifies how the view’s
text is to be justified. Allowed values include teJustLeft, teJustRight, and
teJustCenter. The itsStyleType parameter specifies whether the TTEView object can
display more than one text style at once; kWithStyle specifies that the view
can display multiple styles, and kWithoutStyle specifies that it cannot. The
itsAutoWrap parameter specifies whether lines of text that are longer than the view
is wide will wrap to the next line or will extend beyond the right edge of the
view. A value of TRUE specifies that long lines will automatically wrap.
MacApp calls ITEView from methods that must create a TTEView object, such as
TDialogView.MakeTEView. You can use this method in a similar fashion.
æKY TTEView.MakeTERecord
æD PROCEDURE TTEView.MakeTERecord;
æFi UTEView.p
æT METHOD
æC MakeTERecord creates the TextEdit record that the TTEView object uses to store
and manipulate its text. MacApp calls MakeTERecord from methods that create and
initialize new TTEView objects. You usually do not need to call this method
yourself.
æKY TTEView.RecalcText
æD PROCEDURE TTEView.RecalcText;
æFi UTEView.p
æT METHOD
æC RecalcText recomputes the positions of breaks in the lines of text displayed by
the TTEView object. MacApp calls RecalcText from methods that change the text
or the style of the text displayed by the TTEView object. You usually do not
need to call this method yourself.
æKY TTEView.Resize
æD PROCEDURE TTEView.Resize(width, height: VCoordinate; invalidate: BOOLEAN); OVERRIDE;
æFi UTEView.p
æT METHOD
æC Resize sets the size of the TTEView object to the specified size. The parameters
to this method are used only by the call to INHERITED Resize; thus, they
function as the parameters to TView.Resize. The width parameter is the view’s new
horizontal dimension, expressed in view coordinates. The height parameter is the
view’s new vertical dimension, expressed in view coordinates. If you set the
value of the invalidate parameter to TRUE, the view is invalidated, forcing it to
be redrawn in the update process. When you know the view will be redrawn
eventually and wish to avoid drawing it twice—which makes the screen appear to
flash—you can set the invalidate parameter to FALSE. MacApp calls Resize from
methods that change the size of a view. You can use this method when you must
directly change a TTEView object’s size.
æKY TTEView.ScrollSelectionIntoView
æD PROCEDURE TTEView.ScrollSelectionIntoView;
æFi UTEView.p
æT METHOD
æC ScrollSelectionIntoView scrolls the contents of the TTEView object until the
current selection or insertion point is visible. If the selected area is too large
to fit in the visible area of the window, then ScrollSelectionIntoView ensures
that the upper-left part of the selection is visible. MacApp calls
ScrollSelectionIntoView from a variety of methods that handle events in the TTEView
object. You usually do not need to call this method yourself, but you can use it if
you need to ensure that the selection or the insertion point is visible.
æKY TTEView.SetJustification
æD PROCEDURE TTEView.SetJustification(newJust: INTEGER; redraw: BOOLEAN);
æFi UTEView.p
æT METHOD
æC SetJustification sets the TTEView object’s justification style to the specified
value. The parameter newJust is an integer specifying the justification style
that the TTEView object is to use. Allowed values include teJustLeft = 0
teJustCenter = 1 teJustRight = -1 teForceLeft = -2 The redraw parameter specifies
whether the TTEView object is to redraw its contents after it sets the
justification style; it redraws its contents if redraw is set to TRUE. MacApp calls
SetJustification to change the justification style of a TTEView object. You can use
this method in a similar fashion.
æKY TTEView.SetOneStyle
æD PROCEDURE TTEView.SetOneStyle(theStart, theEnd, theMode: INTEGER;
theStyle: TextStyle; redraw: BOOLEAN);
æFi UTEView.p
æT METHOD
æC SetOneStyle sets the text style of a continuous range of characters. The
parameter theStart is the position in the text record of the first character to be
affected. The parameter theEnd is the position of the last character to be
affected. The parameter theMode controls which style attributes to set; its value can
be any additive combination of the following values: doFont = 1 (set the font
number) doFace = 2 (set the character style) doSize = 4 (set the type size)
doColor = 8 (set the color) doAll = 15 (set all attributes) addSize = 16 (adjust
type size) theStyle is a style record that specifies the new style that applies
to the specified range of characters. The redraw parameter specifies whether the
TTEView object is to redraw its contents; if redraw is set to TRUE, then the
contents are redrawn. MacApp calls SetOneStyle from TDialogTEView.InstallEditText and
TTEStyleCommand.InstallOneStyle. You can use this method to change the style of a
specified range of text characters.
æKY TTEView.SetText
æD PROCEDURE TTEView.SetText(theText: Str255);
æFi UTEView.p
æT METHOD
æC SetText installs the specified text in the TTEView object. The parameter theText
is the text that appears in the TTEView view. MacApp calls SetText from several
methods that initialize or change the text that appears in a TTEView object.
You can use this method in a similar fashion.
æKY TTEView.ShowReverted
æD PROCEDURE TTEView.ShowReverted; OVERRIDE;
æFi UTEView.p
æT METHOD
æC ShowReverted corrects the line heights in the text and the size of the view and
then calls INHERITED ShowReverted. MacApp calls ShowReverted from
TRevertDocCommand.DoIt. You usually do not need to call this method yourself. You must
override this method in TTEView subclasses if you want to provide more specific
reverting behavior.
æKY TTEView.SpaceForStyles
æD FUNCTION TTEView.SpaceForStyles(rangeStart, rangeEnd: LONGINT): BOOLEAN;
æFi UTEView.p
æT METHOD
æC SpaceForStyles returns the value TRUE if there is enough memory available to
store the style data of the specified range of characters; otherwise, it returns
FALSE. The rangeStart parameter is the position in the TTEView object’s text of
the first character in the specified range. The rangeEnd parameter is the
position of the last character of the specified range. MacApp calls SpaceForStyles
from methods that copy and paste style information. You can use this method when
you need to ensure that enough memory is available to permit you to store
style data for a range of text.
æKY TTEView.StuffStyles
æD PROCEDURE TTEView.StuffStyles(theStyles: TEStyleHandle; theElements: STHandle);
æFi UTEView.p
æT METHOD
æC StuffStyles applies the styles specified by the supplied style record to the
TTEView object’s TextEdit record. See pp. 261-263 of Inside Macintosh, Volume V,
for a more complete explanation of TextEdit style records and style tables. The
parameter theStyles is a handle to a TextEdit style record describing the
specified styles. The parameter theElements is a style table for the TextEdit
record. You can call StuffStyles to apply a specified style to a particular range of
characters in a TTEView object.
æKY TTEView.StuffTERects
æD PROCEDURE TTEView.StuffTERects(newTERect: Rect);
æFi UTEView.p
æT METHOD
æC StuffTERects sets the destination rectangle and the view rectangle of the
TTEView object’s associated TextEdit record to the specified rectangle. See pp.
374-380 of Inside Macintosh, Volume I, for a more complete discussion of TextEdit
records. The newTERect parameter is the rectangle that becomes the new
destination and view rectangles of the TextEdit record. MacApp calls StuffTERects from
TTEView.Resize. You usually do not need to call this method yourself.
æKY TTEView.StuffText
æD PROCEDURE TTEView.StuffText(theText: Handle);
æFi UTEView.p
æT METHOD
æC StuffText sets the text of the TTEView object to the specified text. The
parameter theText is a handle to the new text. The old handle is overwritten. MacApp
calls StuffText from TTEView.SetText and TTECutCopyCommand.DoIt. You usually do
not need to call this method yourself; you should usually use TTEView.SetText
to set the view’s text. If you need to apply style data to the text before it
becomes part of the TTEView object, you can use StuffStyles to apply the style
data to the text and then call StuffText to add it to the view.
æKY TTEView.SynchView
æD PROCEDURE TTEView.SynchView(redraw: BOOLEAN);
æFi UTEView.p
æT METHOD
æC SynchView adjusts the TTEView object to ensure consistency after a TextEdit
operation. If the redraw parameter is set to TRUE, then the method causes the
current text selection to scroll into view. MacApp calls SynchView from a variety of
methods that perform TextEdit operations on the TTEView object’s associated
TextEdit record. You can use this method when you manipulate the TextEdit record
and want to ensure that the view’s state is consistent afterward.
æKY TTEView.ViewEnable
æD PROCEDURE TTEView.ViewEnable(state, redraw: BOOLEAN); OVERRIDE;
æFi UTEView.p
æT METHOD
æC ViewEnable resets the view's idle frequency when the enable state of the view
changes. The method then calls INHERITED ViewEnable. The value of the state
parameter becomes the new value of the TView object’s fViewEnabled field. If the
redraw parameter is set to TRUE, then the view is redrawn. You probably will not
need to call this method.
æKY TTEView.WRes
æD PROCEDURE TTEView.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UTEView.p
æT METHOD
æC WRes writes the TTEView portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TTEView section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the end
of the previously-written resource data; if there is not enough space to write
your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when the
WRes method completes.
æKY TTEView.WriteRes
æD PROCEDURE TTEView.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UTEView.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('tevw') and
class name ('TTEView') for the ‘view’ resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TTEView object as part of a 'view' resource; you can use it in a similar fashion. You
can override this method to provide your own unique class name or signature.
æKY TTEView.WriteToDeskScrap
æD PROCEDURE TTEView.WriteToDeskScrap; OVERRIDE;
æFi UTEView.p
æT METHOD
æC WriteToDeskScrap writes the text of the TTEView object to the desk scrap. MacApp
calls WriteToDeskScrap from TApplication.AboutToLoseControl when the application is
about to become inactive. You usually do not need to call this method yourself.
æKY TTextGridView.DrawCell
æD PROCEDURE TTextGridView.DrawCell(aCell: GridCell; aQDRect: Rect); OVERRIDE;
æFi UGridView.p
æT METHOD
æC DrawCell draws the text contained in a TGridView cell. The aCell parameter
specifies the cell whose text is to be drawn. The aQDRect parameter defines the
QuickDraw rectangle in which MacApp draws the text. TGridView.DrawRangeOfCells
calls DrawCell. If you want to change the way the text is drawn, you must override
this method.
æKY TTextGridView.Fields
æD PROCEDURE TTextGridView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TTextGridView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TTextGridView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TTextGridView.Focus
æD FUNCTION TTextGridView.Focus: BOOLEAN; OVERRIDE;
æFi UGridView.p
æT METHOD
æC Focus returns the value TRUE and calls TTextGridView.SetPen if the inherited
method TView.Focus succeeds in focusing the view; otherwise, Focus returns the
value FALSE. MacApp calls Focus from TTextGridView.DrawCell prior to actually
drawing the text. You must call Focus in any TTextGridView method besides DrawCell
that draws in the view. Do not change the behavior of Focus.
æKY TTextGridView.GetText
æD PROCEDURE TTextGridView.GetText(aCell: GridCell; VAR aString: Str255);
æFi UGridView.p
æT METHOD
æC GetText retrieves the current text to be drawn in a specified TTextGridView
cell. It is an empty method; your TTextGridView subclass must override this method
and provide the code to supply the string corresponding to the specified item.
The aCell parameter specifies the cell whose text is to be retrieved. When this
method returns, the parameter aString stores the text string that this method
retrieves. MacApp calls GetText from TTextGridView.DrawCell when drawing the
text in a TTextGridView cell. You must always override GetText.
æKY TTextGridView.IRes
æD PROCEDURE TTextGridView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC IRes initializes a TTextGridView object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TStaticText
object. The itsSuperView parameter specifies the TView object into which the view is
to be installed; for a TTextGridView object, this is usually a TView, TWindow,
or TScroller object. The itsParams parameter is a pointer to the portion of
the 'view' resource data used to initialize this view. When the IRes method
finishes initializing the view, the method moves the pointer to the end of this
data. MacApp calls this method for each of the views created from a 'view' resource
template, usually in response to a NewTemplateWindow or a DoCreateViews call.
You never need to call IRes yourself.
æKY TTextGridView.ITextGridView
æD PROCEDURE TTextGridView.ITextGridView(itsDocument: TDocument; itsSuperView: TView;
itsLocation: VPoint; itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer;
numOfRows: INTEGER; numOfCols: INTEGER; rowHeight: INTEGER; colWidth: INTEGER;
adornRows: BOOLEAN; adornCols: BOOLEAN; rowInset: INTEGER; colInset: INTEGER;
singleSelection: BOOLEAN;
itsTextStyle: TextStyle);
æFi UGridView.p
æT METHOD
æC ITextGridView initializes the fields of a TTextGridView object. The itsDocument
parameter is the document associated with the TTextGridView object.The
itsSuperView parameter is the view in which the TTextGridView object is installed.
(Usually, this view is a TWindow or TScroller object.) The itsLocation parameter
specifies the point that is the upper-left corner of the view, described in the
local coordinates of the superview. The itsSize parameter is the bottom-right
corner of the view, described in the local coordinates of the superview (this
parameter is ignored for the appropriate dimension if the value of the itsHSizeDet
or itsVSizeDet parameter is sizeVariable). The itsHSizeDet and itsVSizeDet
parameters determine how the view’s horizontal and vertical dimensions are
calculated, respectively. Possible values are: sizeSuperView (subview is the same size
as superview), sizeRelSuperView (subview size changes an equal amount relative
to the superview's size), sizePage (view is the size of one page),
sizeFillPages (view expands to fill an exact number of pages), sizeVariable (view size
fluctuates according to application-specific criteria), and sizeFixed (no special
handling of size issues). The numOfRows parameter is the number of rows in the
grid; similarly, the numOfCols parameter is the number of columns in the grid.
The rowHeight parameter is the height, in pixels, of each row in the grid; the
colWidth parameter is the width, in pixels, of each column in the grid. The
adornRows and adornCols parameters specify whether to adorn the rows or colums of
the grid; if either is set to TRUE, then MacApp calls the appropriate method,
TGridView.AdornRow or TGridView.AdornCol, from TGridView.Draw. The rowInset
parameter is the space, in pixels, between rows; the colInset parameter is the
corresponding space between columns. If the value of the singleSelection parameter
is TRUE, then only one cell can be selected at a time. The itsTextStyle
parameter specifies the font, font size, style, and color of the text displayed in the
cells. MacApp predefines certain constants that specify text styles in the
file UMacApp.p. MacApp calls ITextGridView from TTextListView.ITextListView to do
essential initialization of the fields of a new TTextListView object when it is
created by procedure. You can use this method in a similar fashion.
æKY TTextGridView.SetPen
æD PROCEDURE TTextGridView.SetPen;
æFi UGridView.p
æT METHOD
æC SetPen sets the font and pen characteristics of the current port. MacApp calls
SetPen from the TTextGridView methods Focus, Draw, and SetUpFont. You can use
SetPen to set the port's text style and the pen size, pen mode, and pen pattern
to an initial state without changing the pen location.
æKY TTextGridView.SetUpFont
æD PROCEDURE TTextGridView.SetUpFont;
æFi UGridView.p
æT METHOD
æC SetUpFont sets the fLineHeight and fLineAscent fields to that specified by the
TTextGridView’s fTextStyle field. MacApp calls SetUpFont from TTextGridView.IRes
and TTextGridView.ITextGridView to set font attributes when initializing
TTextGridView objects. You can use SetUpFont to ensure that text drawn by your
methods appears in the view’s style.
æKY TTextGridView.WRes
æD PROCEDURE TTextGridView.WRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC WRes writes the TTextGridView portion of the view’s resource template to the
location specified by the itsParams parameter. The parameter theResource is a
handle to the view’s resource template. The parameter itsParams is a pointer to the
TTextGridView section of the view’s resource template. WRes is the inverse of
the IRes method, and is used only by programs that write 'view' resources; for
example, ViewEdit uses this method to create new 'view' resources from views
that are active on the screen. You rarely need to call this method yourself. You
must override this method in your subclasses to create your own 'view'
resources. Your override should check the size of the space remaining in the template
past the end of the previously-written resource data; if there is not enough
space to write your data into the file, your override should call the global
routine ExpandPtr, passing as arguments the current values of theResource,
itsParams, and the size of your resource data, in bytes. ExpandPtr expands the 'view'
resource handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is
greater. You need not be concerned about making the 'view' resource handle too
big, because MacApp reclaims unused space by returning a new value for
itsParams when the WRes method completes.
æKY TTextGridView.WriteRes
æD PROCEDURE TTextGridView.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('txtg') and
class name ('TTextGridView') for the 'view' resource template, and then calls
WRes to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the
parameters MacApp uses to create the new resource. MacApp calls this method to write a
TTextGridView object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TTextListView.AllItemsDo
æD PROCEDURE TTextListView.AllItemsDo(PROCEDURE DoToItem(anItem: INTEGER));
æFi UGridView.p
æT METHOD
æC AllItemsDo is a general utility method that enables you to perform operations on
all of the items in a TTextListView list. This method iterates over all the
items in the list, performing the DoToItem procedure on each one in turn.
DoToItem is a procedure of one argument that you must declare and implement yourself.
The procedure you write can have any name that does not conflict with other
procedures in the scope of the TTextListView class. Just as you can create any
variable of the proper type and then pass it as an argument to a procedure, you
can create any procedure and pass it to AllItemsDo, as long as the procedure
accepts one argument of type INTEGER. MacApp binds this procedure to the formal
parameter DoToItem and then calls it with each of the items in the TTextListView
list bound to the parameter anItem. You can use this method to perform an
operation on every element in a TTextListView list. You usually do not need to
override AllItemsDo.
æKY TTextListView.CanSelectCell
æD FUNCTION TTextListView.CanSelectCell(aCell: GridCell): BOOLEAN; OVERRIDE;
æFi UGridView.p
æT METHOD
æC CanSelectCell returns the value TRUE if the specified cell can be selected. The
aCell parameter is the cell to be tested. MacApp calls CanSelectCell from
several methods that determine selections in TGridView objects. You can call this
method when you want to determine if a cell can be selected.
æKY TTextListView.CanSelectItem
æD FUNCTION TTextListView.CanSelectItem(anItem: INTEGER): BOOLEAN;
æFi UGridView.p
æT METHOD
æC CanSelectItem returns the value TRUE if the specified item is a valid row number
in the TTextListView object. The anItem parameter is an integer that specifies
the item to be tested. MacApp calls this method from TTextListView.CanSelectCell to
validate the value of the anItem parameter.
æKY TTextListView.DelItemAt
æD PROCEDURE TTextListView.DelItemAt(anItem: INTEGER; numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC DelItemAt deletes the specified items in the TTextListView object’s list of
items. The anItem parameter is the index of the first item to be deleted. Items in
a TTextListView are numbered from the first item, beginning with 1. The
numOfItems parameter is the number of items to be deleted from the list. MacApp calls
DelItemAt from the TTextListView methods DelItemFirst and DelItemLast. You can
use DelItemAt when you want to remove an item or a range of items from a
TTextListView object.
æKY TTextListView.DelItemFirst
æD PROCEDURE TTextListView.DelItemFirst(numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC DelItemFirst deletes a specified number of items, beginning with the first, from
the TTextListView object’s list of items. The numOfItems parameter is the
number of items to be deleted. You can call DelItemFirst to delete an item or a
group of items from the front of a TTextListView object’s list of items.
æKY TTextListView.DelItemLast
æD PROCEDURE TTextListView.DelItemLast(numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC DelItemLast deletes the specified number of items from the end of a
TTextListView list. The numOfItems parameter is the number of items to be deleted from
the list. You can call DelItemLast to delete an item or a group of items from the
end of a TTextListView object’s list of items.
æKY TTextListView.EachItemDo
æD PROCEDURE TTextListView.EachItemDo(start, stop: INTEGER;
PROCEDURE DoToItem(anItem: INTEGER));
æFi UGridView.p
æT METHOD
æC EachItemDo performs a specified procedure on each of the items in a particular
range of the TTextListView object’s list of items. The start parameter is the
index of the first item to be processed, and the stop parameter is the index of
the last. Items in a TTextListView object are numbered from the first item in
the list, beginning with 1. DoToItem is a procedure that you define. This
procedure can have any name you like, just as the variables passed in the start and
stop parameters can have any name you like. The procedure you define must take
one parameter of type INTEGER; this is the anItem parameter. EachItemDo iterates
over all the items in the range specified by the start and stop parameters,
binding each one in turn to the formal parameter anItem. In this way, EachItemDo
can perform the DoToItem procedure on each of a sequence of items in the list.
MacApp uses EachItemDo to perform an operation on each of a range of items in a
TTextListView object. You can use this method for similar purposes.
æKY TTextListView.EachSelectedItemDo
æD PROCEDURE TTextListView.EachSelectedItemDo(PROCEDURE DoToItem(anItem: INTEGER));
æFi UGridView.p
æT METHOD
æC EachSelectedItemDo performs the DoToItem procedure on each selected item.
DoToItem is the procedure that MacApp performs on each selected item. You must define
a procedure that takes one argument of type INTEGER and pass it in this
parameter. MacApp calls EachSelectedItemDo from methods that iterate over the items
displayed in a TTextListView object. You can use this method in a similar fashion.
æKY TTextListView.Fields
æD PROCEDURE TTextListView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UGridView.p
æT METHOD
æC Fields reports the contents of each field of the TTextListView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to report
the contents of each field. Fields iterates over all the fields of the
TTextListView object, performing DoToField on each one. The fieldName parameter is the
name of the field. The fieldAddr parameter is the field’s location in memory.
The fieldType parameter uses a predefined constant to tell Fields what type of
information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the Inspector
to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TTextListView.FirstSelectedItem
æD FUNCTION TTextListView.FirstSelectedItem: INTEGER;
æFi UGridView.p
æT METHOD
æC FirstSelectedItem returns an integer specifying the first selected item in a
TTextListView list; it returns 0 if no item is selected. You can call
FirstSelectedItem to obtain an index to the first selected item in a
TTextListView list.
æKY TTextListView.GetItemHeight
æD FUNCTION TTextListView.GetItemHeight(anItem: INTEGER): INTEGER;
æFi UGridView.p
æT METHOD
æC GetItemHeight returns the height, in pixels, of the specified item. The anItem
parameter specifies the item whose height is to be returned. Items are numbered
from the beginning of the list, starting with 1. You can call GetItemHeight to
get the height of an item in a TTextListView list.
æKY TTextListView.GetItemText
æD PROCEDURE TTextListView.GetItemText(anItem: INTEGER; VAR aString: Str255);
æFi UGridView.p
æT METHOD
æC GetItemText gets the text to be drawn for a specified item in a TTextListView
list. GetItemText is an empty method; your TTextListView subclass must override
this method and provide the code to supply the string corresponding to the
specified item. The anItem parameter is an integer that specifies the list item
whose text is to be retrieved. The aString parameter stores the string that
corresponds to the item specified in anItem. MacApp calls GetItemText from
TTextListView.GetText to retrieve the text for an item in a TTextListView list. You
can use this method in a similar fashion. You must always override GetItemText.
æKY TTextListView.GetItemWidth
æD FUNCTION TTextListView.GetItemWidth: INTEGER;
æFi UGridView.p
æT METHOD
æC GetItemWidth returns the width of the TTextListView view. You can call
GetItemWidth to obtain the width of a TTextListView view.
æKY TTextListView.GetText
æD PROCEDURE TTextListView.GetText(aCell: GridCell; VAR aString: Str255); OVERRIDE;
æFi UGridView.p
æT METHOD
æC GetText passes an item number to TTextListView.GetItemText, which returns the
string associated with that TTextListView ist item. Note that GetItemText is an
empty method; you must override GetItemText and provide the code that retrieves
he string corresponding to the specified item. The anItem parameter specifies
the list item whose text is to be retrieved. When this method returns, the
aString parameter stores the text string corresponding to the item specified by the
aCell parameter. MacApp calls GetText from TTextGridView.DrawCell when drawing
text in a TTextListView cell. You can call GetText to obtain the string
associated with a particular item in a TTextListView list.
æKY TTextListView.InsItemBefore
æD PROCEDURE TTextListView.InsItemBefore(anItem: INTEGER; numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC InsItemBefore inserts a specified number of items in a specified position in a
TTextListView list. The anItem parameter is the index of the item before which
the new items are to be inserted. Items in a TTextListView object are numbered
from 1 to the value of the fNumOfRows field. The numOfItems parameter is the
number of items to be inserted. MacApp calls InsItemBefore from the TTextListView
methods InsItemFirst and InsItemLast. You can use InsItemBefore to insert items
in a TTextListView object.
æKY TTextListView.InsItemFirst
æD PROCEDURE TTextListView.InsItemFirst(numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC InsItemFirst inserts a specified number of items at the beginning of a
TTextListView list. The numOfItems parameter is the number of new items to be
inserted. You can call InsItemFirst to add new items to the beginning of a
TTextListView list.
æKY TTextListView.InsItemLast
æD PROCEDURE TTextListView.InsItemLast(numOfItems: INTEGER);
æFi UGridView.p
æT METHOD
æC InsItemLast inserts a specified number of items at the end of a TTextListView
list. The numOfItems parameter is the number of new items to be inserted. You can
call InsItemLast to add new items to the end of a TTextListView list.
æKY TTextListView.InvalidateItem
æD PROCEDURE TTextListView.InvalidateItem(anItem: INTEGER);
æFi UGridView.p
æT METHOD
æC InvalidateItem invalidates the specified item, causing it to be redrawn. The
anItem parameter is the index of the item to be invalidated. MacApp numbers items
in a TTextListView view from 1 to the value of the fNumOfRows field. You can
call this method to cause an item in a TTextListView list to be redrawn.
æKY TTextListView.IsItemSelected
æD FUNCTION TTextListView.IsItemSelected(anItem: INTEGER): BOOLEAN;
æFi UGridView.p
æT METHOD
æC IsItemSelected returns the value TRUE if the specified item in a TTextListView
list is selected. The anItem parameter is the index of the item to be tested.
You can call this method to determine whether an item in a TTextListView list is
selected.
æKY TTextListView.ITextListView
æD PROCEDURE TTextListView.ITextListView(itsDocument: TDocument; itsSuperView: TView;
itsLocation: VPoint; itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer;
numOfItems: INTEGER; rowHeight: INTEGER; colWidth: INTEGER; adornRows: BOOLEAN;
adornCols: BOOLEAN; rowInset: INTEGER; colInset: INTEGER;
singleSelection: BOOLEAN; itsTextStyle: TextStyle);
æFi UGridView.p
æT METHOD
æC ITextListView initializes the fields of a TTextListView object. The itsDocument
parameter is the document associated with the TTextListView object.The
itsSuperView parameter is the view into which the TTextListView object is installed.
(Usually, this view will be a TWindow or TScroller object.) The itsLocation
parameter specifies the point that is the top-left corner of the view, described in
the local coordinates of the superview. The itsSize parameter is the
bottom-right corner of the view, described in the local coordinates of the superview
(this parameter is ignored for the appropriate dimension if the value of the
itsHSizeDet or itsVSizeDet parameter is sizeVariable). The itsHSizeDet and
itsVSizeDet parameters determine how the view’s horizontal and vertical dimensions are
calculated, respectively. Possible values are: sizeSuperView (subview is the same
size as superview), sizeRelSuperView (subview size changes an equal amount
relative to the superview's size), sizePage (view is the size of one page),
sizeFillPages (view expands to fill an exact number of pages), sizeVariable (view
size fluctuates according to application-specific criteria), and sizeFixed (no
special handling of size issues). The numOfItems parameter is the number of items
in the list. If numOfItems is nonzero, then the list view is initialized to the
specified size. The rowHeight parameter is the height, in pixels, of each item
in the list; the colWidth parameter is the width, in pixels, of the items in
the list. The width and height of the items in the list are determined by font
attributes such as size and style. The items' default size may be changed by
calling TTextListView.SetItemHeight and TTextListView.SetItemWidth. The adornRows
and adornCols parameters specify whether to adorn the rows or columns of the
grid; if either is set to TRUE, then MacApp calls the appropriate method,
TGridView.AdornRow or TGridView.AdornCol, from TGridView.Draw. The rowInset parameter
is the space, in pixels, between items in the list; the colInset parameter is
the corresponding space between columns. If the value of the singleSelection
parameter is TRUE, then only one cell can be selected at a time. The itsTextStyle
parameter specifies the style of the text displayed in the list. MacApp
predefines certain constants that specify text styles in the file UMacApp.p. You must
call ITextListView when you create a new TTextListView object procedurally.
æKY TTextListView.LastSelectedItem
æD FUNCTION TTextListView.LastSelectedItem: INTEGER;
æFi UGridView.p
æT METHOD
æC LastSelectedItem returns an index to the last item in a range of
currently-selected items in a TTextListView list, or 0 if no item is selected. MacApp
never calls LastSelectedItem; it is provided for your convenience. You can use this
method to obtain an index to the last selected item in a TTextListView list.
æKY TTextListView.Resize
æD PROCEDURE TTextListView.Resize(width, height: VCoordinate;
invalidate: BOOLEAN); OVERRIDE;
æFi UGridView.p
æT METHOD
æC This method calls INHERITED Resize to resize the portion of the view containing
the text list view, redrawing it and its subviews if requested, and then
adjusts the width of the TTextListView object’s columns. The parameters to this
method are used only by the call to INHERITED Resize; thus, they function as the
parameters to TView.Resize. The width parameter is the view’s new horizontal
dimension, expressed in view coordinates. The height parameter is the view’s new
vertical dimension, expressed in view coordinates. If you set the value of the
invalidate parameter to TRUE, the view is invalidated, forcing it to be redrawn in
the update process. When you know the view will be redrawn eventually and wish
to avoid drawing it twice—which makes the screen appear to flash—you can set
the invalidate parameter to FALSE. MacApp calls Resize from methods that change
the size of grid views. You can call this method to adjust the size of a
TTextListView list.
æKY TTextListView.SelectCell
æD PROCEDURE TTextListView.SelectCell(theCell: GridCell; extendSelection, highlight,
select: BOOLEAN); OVERRIDE;
æFi UGridView.p
æT METHOD
æC SelectCell passes an item number to TTextListView.SelectItem, which selects the
appropriate TTextListView list item. The parameter theCell is the new cell
affected by this method. If the value of the extendSelection parameter is TRUE,
then MacApp includes in the selection the cells that were previously selected as
well as the new cell; if the value of the extendSelection parameter is FALSE,
then the cell specified by the parameter theCell becomes the only selected cell.
If the value of the highlight parameter is TRUE, then MacApp highlights the new
selection. If the value of the select parameter is TRUE, then the specified
cell becomes the new selection; if this parameter is set to FALSE, then all cells
are unselected. You can call this method to manipulate the selection in a
TTextListView list.
æKY TTextListView.SelectItem
æD PROCEDURE TTextListView.SelectItem(anItem: INTEGER; extendSelection, highlight,
select: BOOLEAN);
æFi UGridView.p
æT METHOD
æC SelectItem passes an index to INHERITED SelectCell, which selects a specified
TTextListView element. The anItem parameter is the selected item’s position in
the TTextListView list. Items in a TTextListView list are numbered consecutively
from the beginning of the list, starting with 1. If the value of the
extendSelection parameter is TRUE, then MacApp includes in the selection the cells
that were previously selected as well as the new cell; if the value of the
extendSelection parameter is FALSE, then the cell specified by the parameter anItem
becomes the only selected cell. If the value of the highlight parameter is TRUE,
then MacApp highlights the new selection. If the value of the select parameter is
TRUE, then the specified cell becomes the new selection; if this parameter is
set to FALSE, then all cells are unselected. MacApp calls SelectItem from
TTextListView.SelectCell in response to user actions or methods that modify the
selection in a TTextListView list. You can use this method to select a TTextListView
list item by its index number.
æKY TTextListView.SetItemHeight
æD PROCEDURE TTextListView.SetItemHeight(anItem: INTEGER; numOfItems: INTEGER;
aHeight: INTEGER);
æFi UGridView.p
æT METHOD
æC SetItemHeight sets the height of the specified items in a TTextListView list.
The anItem parameter is the index of the first item whose height is to be
adjusted. Items in a TTextListView object are numbered from from 1 to the value of the
fNumOfRows field. The numOfItems parameter is the number of items to be
changed. The aHeight parameter is the new height, in pixels, of the items to be
adjusted. You can call this method to change the height of an item or a range of
items in a TTextListView list.
æKY TTextListView.SetItemWidth
æD PROCEDURE TTextListView.SetItemWidth(aWidth: INTEGER);
æFi UGridView.p
æT METHOD
æC SetItemWidth sets the width of the items in a TTextListView list. The aWidth
parameter is the list's new width, in pixels. You can call this method to change
the width of a TTextListView list.
æKY TTextListView.WriteRes
æD PROCEDURE TTextListView.WriteRes(theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UGridView.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('lstg') and
class name ('TTextListView') for the 'view' resource template, and then calls
WRes to actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the
parameters MacApp uses to create the new resource. MacApp calls this method to write a
TTextListView object as part of a 'view' resource; you can use it in a similar
fashion. You can override this method to provide your own unique class name or
signature.
æKY TTranscriptView.AddText
æD PROCEDURE TTranscriptView.AddText(textBuf: Ptr; byteCount: INTEGER);
æFi UTranscriptView.p
æT METHOD
æC AddText adds text to the Debug Transcript file or draws it in the Debug
Transcript window if the respective fWrToFile or fWrToWindow field has the value TRUE.
AddText also performs any pending updates for the Debug Transcript window. The
textBuf parameter is a pointer to a data structure in memory where the Debug
Transcript text is stored until it is written to the file or the window. The
byteCount parameter is the number of bytes to be read from textBuf. AddText is
called by the global routine DebugWriteLn. You never need to call it yourself.
æKY TTranscriptView.AddTextToFile
æD PROCEDURE TTranscriptView.AddTextToFile(textBuf: Ptr; byteCount: INTEGER);
æFi UTranscriptView.p
æT METHOD
æC If fGotRefnum is set to TRUE, AddTextToFile writes the text in textBuf to the
file referred to by fRefNum. AddTextToFile also has a stub for code you provide
to perform an operation every time this method is called; it executes the stub
if the Macintosh Toolbox routine FSWrite returns noErr. The textBuf parameter is
a pointer to a data structure in memory where the Debug Transcript text is
stored until it is written to the file or window. The byteCount parameter is the
number of bytes to be read from textBuf. AddTextToFile is called by
TTTranscriptView.AddText when the field fWrToFile has the value TRUE. You usually do
not need to call it yourself unless you change the way the debugger works.
æKY TTranscriptView.CommonInit
æD PROCEDURE TTranscriptView.CommonInit(itsSuperView: TView; outputFont,
outputSize: INTEGER; numLines, numCharsPerLine: INTEGER);
æFi UTranscriptView.p
æT METHOD
æC CommonInit performs initialization common to all TTranscriptView objects. The
itsSuperView parameter is the superview in which the transcript view will be
installed. The outputFont parameter is an integer indicating the font that will be
used to draw or print the debugger output. The outputSize parameter is the font
size of the output font. The numLines parameter is the number of lines that
can fit in the TTranscriptView buffer. The numCharsPerLine parameter is the number
of characters in the output font that fit onto one line in the Debug
Transcript buffer. CommonInit is called by the methods TTranscriptView.IRes and
TTranscriptView.ITranscriptView to do initialization common to TTranscriptView objects.
æKY TTranscriptView.DoHelp
æD FUNCTION TTranscriptView.DoHelp(VAR info: EventInfo;
VAR message: UNIV Longint): TCommand;
æFi UTranscriptView.p
æT METHOD
æC DoHelp returns NIL, makes sure the ProcPtr in fHelpProc is not NIL, and then
calls the global routine CallHelpProc with fHelpProc as the parameter. The info
parameter is the Toolbox event that caused DoHelp to be called. The message
parameter is the help message that is supplied in response to the user's query.
DoHelp is called by TTranscriptView.DoKeyCommand when the user presses the help key
while in the debugger. You never need to call DoHelp unless you change the way
the debugger implements on-line help.
æKY TTranscriptView.DoIdle
æD FUNCTION TTranscriptView.DoIdle(phase: IdlePhase): BOOLEAN; OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC After making sure the view is focused, DoIdle causes the text insertion point to
blink in the active window. The default version of this method always returns
FALSE, indicating that the TTranscriptView object did not free itself. The
phase parameter can have the values idleBegin, idleContinue, or idleEnd. MacApp
sets the value of the phase parameter to idleBegin when there are no events to be
handled in the event record; this value tells DoIdle to pass control to the
first handler in the idle chain. MacApp sets the value of the phase parameter to
idleContinue when the first cohandler in the chain has completed its task and
there still are no events posted in the event record; this value tells DoIdle to
pass control to the next cohandler in the chain. MacApp sets the value of the
phase parameter to idleEnd when an event is posted in the event record; this
value tells DoIdle to pass control to the command chain or click chain, as
appropriate. MacApp calls this method at idle time if the Debug Transcript window is
active. This method is internal to the MacApp debugger; you cannot call it
yourself.
æKY TTranscriptView.DoKeyCommand
æD FUNCTION TTranscriptView.DoKeyCommand(ch: Char; aKeyCode: INTEGER;
VAR info: EventInfo): TCommand; OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC DoKeyCommand returns a TCommand object that handles keystrokes made when the
Debug Transcript window is active. If the Command key is pressed in combination
with Return or Backspace, this method will send a message to scroll down or up
through the transcript view (respectively) and return NIL. If the Help key is
pressed and the value of fHelpProc is not NIL, DoKeyCommand calls
TTranscriptView.DoHelp; if the value of fHelpProc is NIL, DoKeyCommand simply sets
fLastCh to the same value as the ch parameter. All other keystrokes cause DoKeyCommand to
call INHERITED DoKeyCommand. The ch parameter is the alphanumeric character that
corresponds to the key the user pressed. The aKeyCode parameter is the ASCII
key code generated by the keystroke. The info parameter is the event record
description of the event that caused MacApp to call DoKeyCommand; the info
parameter is used to pass information about the event, such as whether the Option key
was pressed. MacApp calls DoKeyCommand when the user presses a key on the
keyboard and the Debug Transcript view is active. This method is internal to the
MacApp debugger; you cannot call it yourself. You usually do not need to override
this method.
æKY TTranscriptView.Draw
æD PROCEDURE TTranscriptView.Draw(area: Rect); OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC This method draws the visible portion of the text in a TTranscriptView view. The
area parameter is the QuickDraw rectangle, expressed in view coordinates, that
defines boundaries of the view. MacApp calls this method to update the Debug
Transcript view. You do not need to call this method yourself.
æKY TTranscriptView.EndForce
æD PROCEDURE TTranscriptView.EndForce;
æFi UTranscriptView.p
æT METHOD
æC This method terminates the execution of TTranscriptView.ForceOutput.
æKY TTranscriptView.Fields
æD PROCEDURE TTranscriptView.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC Fields reports the contents of each field of the TTranscriptView object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TTranscriptView object, performing DoToField on each one. The fieldName parameter is
the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what type
of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its last
action to ensure that the inherited fields are also displayed.
æKY TTranscriptView.ForceOutput
æD PROCEDURE TTranscriptView.ForceOutput(wrToWindow, wrToFile: WrForceOptions);
æFi UTranscriptView.p
æT METHOD
æC ForceOutput stores the current states of fWrToWindow and fWrToFile and
temporarily sets them to the values specified in the arguments to this procedure.
After calling ForceOutput, you can call the global routine DebugForceOutput to do the
work of forcing the debugger's output into another window or file. You can
then call TTranscriptView.EndForce to restore fWrToWindow and fWrToFile to their
previous states. The wrToWindow and wrToFile parameters are options that allow
you to use the Pascal writeLn procedure for a window or a document,
respectively. If the value of wrToWindow is not WrForceUnchanged, MacApp sets the
value of the field fWrToWindow to the Boolean value of the expression
"wrToWindow = WrForceOn" ; otherwise fWrToWindow is left unchanged. The wrToFile
parameter sets the value of fWrToFile similarly; if the value of wrToFIle is not
WrForceUnchanged, MacApp sets the value of the field fWrToFile to the Boolean value of
the expression "wrToFile = WrForceOn" . Otherwise, the value of fWrToFile is left
unchanged. ForceOutput is called by the global routines MADebuggerMainEntry and
DebugForceOutput, which do the actual work of forcing the debugger output into
another window or file.
æKY TTranscriptView.Free
æD PROCEDURE TTranscriptView.Free; OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC Free turns off output redirection if it is on, releases the memory used by the
text in a TTranscriptView view, and then calls INHERITED Free. The MacApp
debugger calls this method when disposing of TTranscriptView objects that are no
longer needed. You usually do not need to call this method yourself.
æKY TTranscriptView.GetInsertionPointRect
æD FUNCTION TTranscriptView.GetInsertionPointRect: Rect;
æFi UTranscriptView.p
æT METHOD
æC GetInsertionPointRect returns the rectangle, expressed in in local coordinates,
defining the boundaries of the list item that contains the insertion point.
GetInsertionPointRect is called by TTranscriptView.AddText and
TTranscriptView.DoKeyCommand to find the insertion point when adding text to the Debug
Transcript window. GetInsertionPointRect is called by TTranscriptView.DoIdle to cause
the insertion point to blink. GetInsertionPointRect is also called by the methods
TTranscriptView.RevealInsertionPoint and TTranscriptView.RevealInsertionPointLine.
You can call GetInsertionPointRect when you need a description of the location of the
insertion point or list item that it marks.
æKY TTranscriptView.HandleMouseDown
æD FUNCTION TTranscriptView.HandleMouseDown(theMouse: VPoint; VAR info: EventInfo;
VAR hysteresis: Point; VAR theCommand: TCommand): BOOLEAN; OVERRIDE;
æFi UTranscriptView.p
æT METHOD
æC HandleMouseDown processes the specified mouse-down event and provides an
appropriate TCommand object to handle undoable actions. This method sets the
affectsMenus field of the event record to FALSE in order to keep the MacApp debugger
from interfering with the current state of menus; it then calls INHERITED
HandleMouseDown to do the actual work of handling the mouse click and returns TRUE if
the mouse click was handled. The parameter theMouse is the current position of
the mouse pointer, expressed in local view coordinates. The info parameter is
the information from the Toolbox event record describing the mouse-down event
that caused this method to be called. The hysteresis parameter is a point that
represents the horizontal and vertical distance the mouse can travel between
clicks and still be considered to be at the same location. MacApp uses this
parameter to determine whether a double click has occurred or if the mouse pointer has
moved. The parameter theCommand is the command object that handles the mouse
click. MacApp calls HandleMouseDown when the user clicks anywhere within the
boundaries of the Debug Transcript window. You usually do not need to call
HandleMouseDown yourself.
æKY TTranscriptView.IndexColToLocal
æD FUNCTION TTranscriptView.IndexColToLocal(index, col: INTEGER): Point;
æFi UTranscriptView.p
æT METHOD
æC IndexColToLocal converts the given values to a point in local view coordinates.
The index parameter is the row number occupied by the specified item. The col
parameter specifies the column containing the specified item. IndexColToLocal is
called by TTranscriptView.AddText when determining the insertion point; it is
also called by TTranscriptView.GetInsertionPointRect when computing the
rectangle that contains the insertion point. You can use IndexColToLocal in a similar
fashion; however, you rarely need to call it yourself unless you modify the
debugger.
æKY TTranscriptView.IndexToLocal
æD FUNCTION TTranscriptView.IndexToLocal(index: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC IndexToLocal returns the vertical coordinate of the specified row. The index
parameter is the row number that is to be converted into a vertical view
coordinate. IndexToLocal is called by TTranscriptView.Draw to determine the vertical
coordinate where drawing will take place; it is also called by
TTranscriptView.IndexColToLocal to determine the vertical coordinate that that method
returns. You can use IndexToLocal in a similar fashion; however, you rarely need to
call it yourself unless you modify the debugger.
æKY TTranscriptView.IndexToRow
æD FUNCTION TTranscriptView.IndexToRow(index: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC IndexToRow returns the index as a row number. The index parameter is the
position in the list that is to be expressed as a row number. IndexToRow is called by
TTranscriptView.IndexToLocal when computing the vertical coordinate of a given
index. You can use IndexToRow in a similar fashion; however, you rarely need to
call it yourself unless you modify the debugger.
æKY TTranscriptView.InstallTextStyle
æD PROCEDURE TTranscriptView.InstallTextStyle(theStyle: TextStyle);
æFi UTranscriptView.p
æT METHOD
æC InstallTextStyle installs a text style into the grafPort being used by the
debugger and resizes the view to accommodate the new text style. Th eparameter
theStyle specifies text attributes such as color, size, and font. InstallTextStyle
is called by the global routine InitUDebug when initializing the view used for
the debugger's output. It is also called by the global routine WindCmd to
install a text style in the view used to display the content of the Debug Transcript
window. You can use InstallTextStyle in a similar fashion; however, you rarely
need to call it yourself unless you modify the debugger.
æKY TTranscriptView.IRes
æD PROCEDURE TTranscriptView.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr);
æFi UTranscriptView.p
æT METHOD
æC IRes initializes a TTranscriptView object from a 'view' resource template. The
itsDocument parameter specifies the TDocument object associated with this view.
The itsSuperView parameter specifies the view in which this view is to be
installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes initializing
the view, the method moves the pointer to the end of this data. MacApp calls
this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. You never need
to call IRes yourself.
æKY TTranscriptView.ITranscriptView
æD PROCEDURE TTranscriptView.ITranscriptView(itsSuperView: TView; outputFont,
outputSize: INTEGER; numLines, numCharsPerLine: INTEGER);
æFi UTranscriptView.p
æT METHOD
æC ITranscriptView initializes a TTranscriptView view. The itsSuperView parameter
is the view in which this view will be installed. The outputFont parameter is an
integer indicating the font that will be used to draw or print the debugger
output. The outputSize parameter is the font size of the output font. The
numLines parameter is the number of lines visible in the TTranscriptView view. The
numCharsPerLine parameter is the number of characters that fit onto one line in
the Debug Transcript window when drawn in the output font. ITranscriptView is
called by the global routine InitUDebug when initializing a TTranscriptView
object. You can use ITranscriptView in a similar fashion; however, you rarely need to
call it yourself unless you modify the debugger.
æKY TTranscriptView.LocalToCol
æD FUNCTION TTranscriptView.LocalToCol(local: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC This method, when overridden, should return the column number of the line that
contains the specified local vertical coordinate. The default version is empty.
The local parameter specifies the vertical coordinate for which the column
number will be returned.
æKY TTranscriptView.LocalToIndex
æD FUNCTION TTranscriptView.LocalToIndex(local: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC LocalToIndex converts a specified vertical local coordinate into an index to the
line buffers. The local parameter specifies the coordinate for which the index
is to be returned. LocalToIndex is called by TTranscriptView.Draw to get the
index of the line to draw. You probably will not need to call this method.
æKY TTranscriptView.PrevIndex
æD FUNCTION TTranscriptView.PrevIndex(ln: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC PrevIndex returns the number of the line that precedes the one specified by the
ln parameter. Lines are wrapped circularly; that is, the line considered to
precede the first one is the last. The ln parameter is the number of the specified
line.
æKY TTranscriptView.Redirect
æD FUNCTION TTranscriptView.Redirect(vRefnum: INTEGER; fileName: StringPtr): OSErr;
æFi UTranscriptView.p
æT METHOD
æC If passed a valid vRefNum, this method redirects debugger output to the
specified file. If the filename contains '>>', the file is opened for append;
otherwise, this method truncates the file to 0 length first. Redirect does not set the
fWrToFile state variable. Redirect returns an OSErr value if any of its
operations fail; otherwise, it returns the value noErr. The vRefNum parameter is the
volume ID of the volume to which the file is to be redirected. The fileName
parameter is a pointer to the string that is the name of the redirect file. Redirect
is called by the global routine DebugRedirect to enable redirection after that
method makes sure the Debug Transcript view is valid. It is also called by the
global routine DebugTerminate and by TTranscriptView.Free to close the
redirect file before attempting other tasks. You can call this method to redirect the
debugger’s output to a file or a view; however, you rarely need to call it
yourself unless you modify the debugger.
æKY TTranscriptView.RevealInsertionPoint
æD PROCEDURE TTranscriptView.RevealInsertionPoint;
æFi UTranscriptView.p
æT METHOD
æC This method displays the insertion point, scrolling through the view if
necessary. The following global routines call RevealInsertionPoint to display the
insertion point on the screen, generally as the precursor to some other action:
DebugReadLn, GetPromptedChar, GetPromptedString, and WithHideFromMacAppDo.
RevealInsertionPoint is also called by TDebugApplication.PollEvent if the Debug
Transcript window is not shown. You can use this method in a similar fashion; however,
you rarely need to call it yourself unless you modify the debugger.
æKY TTranscriptView.RevealInsertionPointLine
æD PROCEDURE TTranscriptView.RevealInsertionPointLine;
æFi UTranscriptView.p
æT METHOD
æC RevealInsertionPointLine displays the line containing the insertion point,
scrolling through the view if necessary. RevealInsertionPointLine is called by
TTranscriptView.AddText to show the line containing the new text. You can use
RevealInsertionPointLine in a similar fashion; however, you rarely need to call it
yourself unless you modify the debugger.
æKY TTranscriptView.RowToIndex
æD FUNCTION TTranscriptView.RowToIndex(row: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC RowToIndex returns an integer representing the specified row as an index into
the line buffers. The row parameter is the number of the row to be converted into
an index. RowToIndex is called by TTranscriptView.AddText and
TTranscriptView.GetInsertionPointRect in determining the insertion point. It is also
called by TTranscriptView.LocalToIndex to compute the index of a row containing a
specified vertical coordinate. You can use RowToIndex in a similar fashion; however,
you rarely need to call this method yourself unless you modify the debugger.
æKY TTranscriptView.Scroll
æD PROCEDURE TTranscriptView.Scroll(howManyLines: INTEGER);
æFi UTranscriptView.p
æT METHOD
æC This method scrolls through the view vertically by the specified number of
lines. The howManyLines parameter specifies the number of lines by which to scroll.
æKY TTranscriptView.SuccIndex
æD FUNCTION TTranscriptView.SuccIndex(ln: INTEGER): INTEGER;
æFi UTranscriptView.p
æT METHOD
æC SuccIndex returns the number of the line that follows the one specified in the
ln parameter. Lines are wrapped circularly; that is, the line considered to
follow the last one is the first. The ln parameter is the number of the specified
line. SuccIndex is called by TTranscriptView.AddText when setting the index of
the next new line in the text buffer. It is also called by TTranscriptView.Draw
when advancing the' insertion point to a new line. You can use SuccIndex in a
similar fashion; however, you rarely need to call it yourself unless you modify
the debugger.
æKY TUndoRedoCommand.DoIt
æD PROCEDURE TUndoRedoCommand.DoIt; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoIt undoes or redoes the last command, updates the view and the Clipboard, and
updates the fChangeCount field as appropriate. MacApp calls this method when
the user chooses the Undo or Redo item from the application’s Edit menu. You
never need to call DoIt yourself.
æKY TUndoRedoCommand.Fields
æD PROCEDURE TUndoRedoCommand.Fields(PROCEDURE DoToField(fieldName: Str255;
fieldAddr: Ptr; fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TUndoRedoCommand object to the
MacApp Inspector. DoToField is a procedure that MacApp passes to Fields to
report the contents of each field. Fields iterates over all the fields of the
TUndoRedoCommand object, performing DoToField on each one. The fieldName parameter
is the name of the field. The fieldAddr parameter is the field’s location in
memory. The fieldType parameter uses a predefined constant to tell Fields what
type of information to look for in a field. MacApp calls Fields from the MacApp
Inspector. You must override this method in your subclasses if you want the
Inspector to display your fields. Your override must call INHERITED Fields as its
last action to ensure that the inherited fields are also displayed.
æKY TUndoRedoCommand.IUndoRedoCommand
æD PROCEDURE TUndoRedoCommand.IUndoRedoCommand(itsCmdNumber: CmdNumber);
æFi UMacApp.p
æT METHOD
æC IUndoRedoCommand initializes a TUndoRedoCommand object and associates it with a
command number. The itsCmdNumber parameter is the command number associated
with a particular menu command — in this case, the Undo or Redo command typically
found in an application's Edit menu. The command number is used in the 'cmnu'
resource in the resource description file; you usually define a constant to
represent that number in both the resource description file and in the appropriate
interface or implementation file of the application. MacApp calls this method
when it creates the TUndoRedoCommand object in TApplication.DoMenuCommand. You
never need to call IUndoRedoCommand yourself.
æKY TView.Activate
æD PROCEDURE TView.Activate(entering: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Activate performs any adjustments to the TView object that correspond to
activation or deactivation of the view. The default version, for example, adjusts its
highlight state and then sends the activate message. The entering parameter
indicates whether the TView object is to be activated or deactivated. For example,
you might expect the value of the entering parameter to be TRUE if the
Activate method of an editable text view is called in response to a user’s mouse click
in the view. This method is called by MacApp when the TView object or its
superview is activated or deactivated.
æKY TView.AddSubView
æD PROCEDURE TView.AddSubView(theSubView: TView);
æFi UMacApp.p
æT METHOD
æC AddSubView adds a new TView object to this view’s list of subviews. If this
view’s list of subviews is NIL, then AddSubView creates a new list. The parameter
theSubView contains the TView object to be added. MacApp calls AddSubView when
installing subviews in windows and dialog boxes. You can use AddSubView to
install palettes in document windows, to install dialog items in dialog boxes, or
for similar purposes.
æKY TView.AdjustSize
æD PROCEDURE TView.AdjustSize;
æFi UMacApp.p
æT METHOD
æC AdjustSize adjusts the size of the view and recalculates pagination. MacApp
calls AdjustSize whenever a change in data may have caused the size of the view to
change. For example, MacApp calls the AdjustSize when a row or column is
deleted in a TGridView.
æKY TView.Adorn
æD PROCEDURE TView.Adorn(area: Rect; itsPenSize: Point; itsAdornment: CntlAdornment);
æFi UMacApp.p
æT METHOD
æC Adorn draws a special border, or adornment, around a specified portion of the
view. The area parameter specifies the rectangle around which the adornment is to
be drawn. Adorn sets the pen size to the value of itsPenSize and then draws an
adornment consisting of any graphic objects contained in the itsAdornment
parameter. The itsAdornment parameter is a set consisting of predefined standard
adornment elements. The default version of this method uses the following
elements: adnShadow = creates a shadow for the adornment adnOval = adorns the view
with an oval adnRRect = adorns the view with a rounded rectangle adnLineTop =
draws a line across the top of the specified area adnLineLeft = draws a line down
the left side of the specified area adnLineBottom = draws a line across the
bottom of the specified area adnLineRight = draws a line down the right side of the
specified area MacApp calls Adorn to draw boxes around editable text fields in
dialog boxes and to draw borders around certain controls. You can call Adorn
in similar circumstances to draw borders around your own TView objects.
æKY TView.AssumeFocused
æD PROCEDURE TView.AssumeFocused;
æFi UMacApp.p
æT METHOD
æC AssumeFocused causes a ProgramBreak if the focused view isn't SELF. For debugging
purposes only, MacApp frequently calls AssumeFocused from a drawing method when
another method should have focused the affected view. You can use
AssumeFocused in a similar way to ensure that the current view is focused before its
drawing methods are called.
æKY TView.AttachPrintHandler
æD PROCEDURE TView.AttachPrintHandler(itsPrintHandler: TPrintHandler);
æFi UMacApp.p
æT METHOD
æC AttachPrintHandler assigns the specified print handler to the TView object’s
fPrintHandler field. MacApp calls AttachPrintHandler when a TView object is
initialized. The method attaches the view’s print handler, which then handles any
printing requests. MacApp also calls AttachPrintHandler when a print handler is
freed. In this case the method assigns gNullPrintHandler to the TView object’s
fPrintHandler field.
æKY TView.BeInPort
æD PROCEDURE TView.BeInPort(itsPort: GrafPtr);
æFi UMacApp.p
æT METHOD
æC BeInPort performs any housekeeping necessary to support graphics or printing
operations on the TView object’s grafPort. The default version calls the
CheckPrinter method of the view’s print handler and sends the BeInPort message to any
subviews. The itsPort parameter is a pointer to the grafPort in which the TView
object is to be drawn; the grafPort is used to support graphics or printing
operations on the view. MacApp uses BeInPort in TView methods that change active
views. You usually do not need to call this method unless you change the way
MacApp activates or deactivates views.
æKY TView.BeInScroller
æD PROCEDURE TView.BeInScroller(itsScroller: TScroller);
æFi UMacApp.p
æT METHOD
æC BeInScroller performs housekeeping that is needed when the TView object’s
scroller becomes the current scroller. In particular, the default version recomputes
the scrolling limit of the TView object’s scroller to keep it current. The
itsScroller parameter is the TView object’s scroller. MacApp calls BeInScroller
when performing operations in which a scroller must be updated, such as adding a
subview to the scroller.
æKY TView.CalcMinSize
æD PROCEDURE TView.CalcMinSize(VAR minSize: VPoint);
æFi UMacApp.p
æT METHOD
æC CalcMinSize calculates the minimum dimensions of the TView object. The minSize
parameter contains the calculated size, represented as a view point, when the
method returns. The default version simply stores the value of the TView object’s
fSize field in minSize. MacApp calls CalcMinSize when changing the size of a
view; you must call CalcMinSize from your methods that change the size of views.
You must override this method in subclasses that need to set a minimum
acceptable size for a view.
æKY TView.ClipFurtherTo
æD PROCEDURE TView.ClipFurtherTo(r: Rect; hDeltaOrg, vDeltaOrg: INTEGER);
æFi UMacApp.p
æT METHOD
æC ClipFurtherTo sets the clipping rectangle of the view to be the intersection of
the current clipping rectangle with the specified rectangle, with the specified
offset. The r parameter specifies the rectangle whose intersection with the
current clipping rectangle is to be determined. The hDeltaOrg parameter specifies
the horizontal offset of the rectangle specified by r, and vDeltaOrg specifies
its vertical offset. The offsets are calculated from the origin of the current
grafPort. MacApp calls ClipFurtherTo in Focus and AutoScroll methods. You
probably will not need to call this method.
æKY TView.Close
æD PROCEDURE TView.Close;
æFi UMacApp.p
æT METHOD
æC This method closes the TView object and its subviews. Close commits the last
command so that it can no longer be undone. MacApp calls this method when a window
is closed. You probably will not need to call Close yourself.
æKY TView.ComputeSize
æD PROCEDURE TView.ComputeSize(VAR newSize: VPoint);
æFi UMacApp.p
æT METHOD
æC ComputeSize calculates the size of the TView object. The computation is
performed in different ways, depending on the value of the fSizeDeterminer field. The
newSize parameter is a VPoint value in which the method stores the computed
size. MacApp calls ComputeSize when it changes the size of the view; for example,
AdjustSize methods call ComputeSize and use the resulting value to set the size
of the view. You can use ComputeSize for similar purposes.
æKY TView.ContainsClipType
æD FUNCTION TView.ContainsClipType(aType: ResType): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC ContainsClipType tests whether there are any resources of the specified resource
type in the desk scrap and returns a value of TRUE if there are. The aType
parameter is a packed array of four characters that specifies a resource type.
MacApp calls ContainsClipType when checking to determine whether it can paste a
resource from the desk scrap into a document.
æKY TView.ContainsMouse
æD FUNCTION TView.ContainsMouse(theMouse: VPoint): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC ContainsMouse tests whether the mouse pointer is within the bounds of the view.
The method returns the value TRUE if the mouse pointer is within a viewthat is
visible. The method returns the value FALSE if the view is not shown on the
screen or if the mouse pointer is not within the bounds of the view. The parameter
theMouse contains the mouse pointer’s location, expressed as a point in view
coordinates. You can call this method to determine whether the pointer is within
a particular view. MacApp uses it for the same purpose.
æKY TView.CountSubViews
æD FUNCTION TView.CountSubViews: INTEGER;
æFi UMacApp.p
æT METHOD
æC CountSubViews returns the number of subviews contained in this view. When
testing mouse clicks in windows and dialog boxes, and when drawing the contents of
windows, MacApp calls CountSubViews to determine whether a given view contains
any subviews that might be affected. You can use this method for the same purpose.
æKY TView.DoBreakFollowing
æD FUNCTION TView.DoBreakFollowing(vhs: VHSelect; prevBreak: VCoordinate;
VAR automatic: BOOLEAN): VCoordinate;
æFi UMacApp.p
æT METHOD
æC DoBreakFollowing forces a page break for printing at a particular position in a
view and returns a view coordinate containing the location of the new page
break. The vhs parameter specifies whether the page break is a horizontal or a
vertical one; that is, whether page 2 is to the right of page 1, or below it. The
prevBreak parameter specifies the position of the previous page break as a
MacApp coordinate. The method stores a Boolean value in the automatic parameter
indicating whether the break is to be considered an automatic page break. The
default method of TStdPrintHandler sets this parameter to TRUE. MacApp calls this
method from other methods that calculate the positions of page breaks. You
normally will not need to call DoBreakFollowing directly.
æKY TView.DoCalcPageStrips
æD PROCEDURE TView.DoCalcPageStrips(VAR pageStrips: Point);
æFi UMacApp.p
æT METHOD
æC DoCalcPageStrips calculates the number of physical pages represented by the
contents of the view, storing the result in the vertical coordinate of the
pageStrips parameter. MacApp calls this method to determine the physical dimensions of
each page in a view that is about to be printed. You usually do not need to
call this method yourself. Override this method to change the way view contents
are divided into pages for printing.
æKY TView.DoCalcViewPerPage
æD PROCEDURE TView.DoCalcViewPerPage(VAR viewPerPage: VPoint);
æFi UMacApp.p
æT METHOD
æC DoCalcViewPerPage computes the size of its view object and calculates the number
of identical views that can be printed vertically on a page. It then returns
this number (truncated to an integer) as the vertical coordinate of the
viewPerPage parameter. MacApp calls this method when performing calculations in
preparation for printing the view. You usually do not need to call this method
yourslef or override it.
æKY TView.DoCheckPrinter
æD PROCEDURE TView.DoCheckPrinter;
æFi UMacApp.p
æT METHOD
æC DoCheckPrinter determines whether the printer selected through the Chooser has
changed. If it has, the method recomputes the effective device resolution and
performs other housekeeping tasks for printing. MacApp calls this method whenever
a new print handler is attached to a view and whenever the currently active
view changes. You can call DoCheckPrinter when you suspect your code needs to
verify the current printer’s characteristics, and you are not sure whether MacApp
will handle it for you.
æKY TView.DoChoice
æD PROCEDURE TView.DoChoice(origView: TView; itsChoice: INTEGER); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC The default version of DoChoice calls the DoChoice method of its superview; it
calls INHERITED DoChoice if there is no superview. Subclasses of TView can
override DoChoice to perform appropriate actions when processing user-generated
events. The origView parameter is the TView object that first made the call to its
DoChoice method in response to a user action. The itsChoice parameter is an
integer specifying the user’s choice. This parameter is necessary for dialog items
that present multiple choices, such as pop-up menus, or clusters of radio
buttons or check boxes. MacApp calls DoChoice in methods such as TrackMouse, when a
user is operating on a view or group of views with the mouse. You can override
this method to perform actions in response to mouse clicks or movement in your
TView objects.
æKY TView.DoDrawPageBreak
æD PROCEDURE TView.DoDrawPageBreak(vhs: VHSelect; whichBreak: INTEGER;
loc: VCoordinate; automatic: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC DoDrawPageBreak draws page breaks in the view. The vhs parameter specifies
whether page breaks are horizontal or vertical; that is, whether page 2 is to the
right of page 1, or below it. The whichBreak parameter specifies which page break
is to be drawn. Page breaks are numbered, with the first one that occurs being
numbered 1. The loc parameter specifies the screen location for the page break
image. The automatic parameter is used to store information on whether the
break is to be considered an automatic page break; the default version of this
method, however, ignores this parameter. MacApp calls DoDrawPageBreak as part of
its print feedback routines. You usually do not need to call DoDrawPageBreak
yourself or override it.
æKY TView.DoDrawPrintFeedback
æD PROCEDURE TView.DoDrawPrintFeedback(area: Rect);
æFi UMacApp.p
æT METHOD
æC DoDrawPrintFeedback draws page breaks, rulers, page numbers, and so on, in views
that might be printed. This method simply calls the DrawPrintFeedback method
of its print handler, the default version of which is an empty method. To draw
anything in the view you must override this DrawPrintFeedback method. The area
parameter is a QuickDraw rectangle, expressed in local coordinates, defining the
part of the control that needs to be redrawn. You use the parameter to
optimize drawing speed. MacApp calls DoDrawPrintFeedback from TView.DrawContents. You
usually do not need to call this method yourself.
æKY TView.DoHighlightSelection
æD PROCEDURE TView.DoHighlightSelection(fromHL, toHL: HLState);
æFi UMacApp.p
æT METHOD
æC DoHighlightSelection sets the highlight state of the TView object’s selection.
The default version of DoHighlightSelection does nothing; you can override it to
perform the appropriate action to highlight a selection in a given TView
object. The parameter fromHL is the selection’s original highlight state; the toHL
parameter is the desired highlight state. Possible highlight states are hlOff
(selection is not highlighted), hlDim (selection is dimmed), and hlOn (selection
is highlighted). MacApp calls this method from Activate methods and from
DrawContents methods; you usually do not need to call it yourself.
æKY TView.DoMenuCommand
æD FUNCTION TView.DoMenuCommand(aCmdNumber: CmdNumber): TCommand;
æFi UMacApp.p
æT METHOD
æC DoMenuCommand returns a TCommand object to handle a user’s menu selections, or
handles the selections directly. The default version of this method handles only
printing commands; it calls the DoMenuCommand method of the view’s print
handler if the aCmdNumber parameter specifies a valid printing command; otherwise,
it calls INHERITED DoMenuCommand. The parameter aCmdNumber is the command number
defined for the selected menu item. MacApp predefines certain command numbers
as constants in the file UMacApp.p; you can define others in your 'cmnu'
resource description and in the appropriate interface or implementation file. MacApp
calls DoMenuCommand when the TView object is currently active and the user
chooses a command from a pull-down menu.You usually do not need to call this method
yourself. You must override this method if you define your own command
numbers. Commands your override cannot handle must be passed back to the command chain
by calling INHERITED DoMenuCommand.
æKY TView.DoMouseCommand
æD FUNCTION TView.DoMouseCommand(VAR theMouse: Point; VAR info: EventInfo;
VAR hysteresis: Point): TCommand;
æFi UMacApp.p
æT METHOD
æC DoMouseCommand, when overridden, performs the appropriate actions to process a
mouse click in a TView object. The override must return a TCommand object to
handle complex commands; simple commands may be handled by the method directly.
The method’s parameters enable you both to pass information to the method and to
receive changes made during the method’s operation. The parameter theMouse is
the location of the mouse click, expressed in local view coordinates. The info
parameter is the mouse-down event record, which is passed on by the method when
it returns in case other methods need to use it. The hysteresis parameter is a
point that represents the horizontal and vertical distance the mouse can travel
between clicks and still be considered to be at the same location. MacApp uses
this parameter to determine whether a double click has occurred or if a
control has moved. MacApp calls DoMouseCommand when the mouse is clicked in the view.
You usually do not need to call this method yourself because MacApp intercepts
mouse clicks for you and dispatches them appropriately. The default version of
this method does nothing. You must override this method to produce useful
behavior, such as selecting an object that is represented in the view, or creating
a TCommand object to perform more complex commands.
æKY TView.DoOffScreen
æD PROCEDURE TView.DoOffScreen(PROCEDURE WhatToDo);
æFi UMacApp.p
æT METHOD
æC This method is experimental and is not supported in MacApp 2.0.
æKY TView.DoPagination
æD PROCEDURE TView.DoPagination;
æFi UMacApp.p
æT METHOD
æC DoPagination recalculates the page breaks in the view for printing. MacApp calls
DoPagination when the size of the view changes or when the printer is changed.
The default version calls the RedoPageBreaks method of the TView object’s
print handler.
æKY TView.DoPrinterChanged
æD PROCEDURE TView.DoPrinterChanged;
æFi UMacApp.p
æT METHOD
æC DoPrinterChanged performs any adjustments that might be necessary when the
printer assignment changes. MacApp calls DoPrinterChanged when CheckPrinter methods
reveal that the printer has changed. The default version calls the PrinterChanged
method of the TView object’s print handler unless there is no PrintHandler;
if there isn't one, the default method does nothing.
æKY TView.DoSetCursor
æD FUNCTION TView.DoSetCursor(localPoint: Point; cursorRgn: RgnHandle): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC DoSetCursor sets the cursor image and returns the value TRUE if the cursor has
been changed. The localPoint parameter is the location of the mouse pointer in
the TView object’s local coordinates. The cursorRgn parameter is a handle to a
region occupied by the cursor image. MacApp calls DoSetCursor from its
HandlerCursor methods. The default method does nothing and always returns FALSE. You
can override this method to test the cursor’s position in a view, change the
cursor image if necessary, and return TRUE when the cursor has been changed.
æKY TView.DoSetPageOffset
æD PROCEDURE TView.DoSetPageOffset(coord: VPoint);
æFi UMacApp.p
æT METHOD
æC DoSetPageOffset sets the offset of the view on the page for printing. The coord
parameter specifies the location of the top-left corner of the view’s image on
the page. MacApp calls DoSetPageOffset from the page setup routines in its
printing methods. Override this method only when you must calculate an image’s
position on the page specially—for example, when you must print tall, unadjusted
text.
æKY TView.DoSetupMenus
æD PROCEDURE TView.DoSetupMenus;
æFi UMacApp.p
æT METHOD
æC DoSetupMenus, when overridden, sets up menus used by the TView object when the
view becomes active. The default version of this method calls INHERITED
DoSetupMenus, and then sends the DoSetupMenus message to the TView object’s print
handler, if it has one. MacApp calls this method when the view or its superview is
selected or otherwise activated, such as when a TWindow object (a descendant of
TView) becomes the active window. You usually do not need to call this method
yourself. If you override this method in your subclasses,your override must call
INHERITED DoSetupMenus as its first action, to allow other handlers to enable
menu items to which they can respond.
æKY TView.Draw
æD PROCEDURE TView.Draw(area: Rect);
æFi UMacApp.p
æT METHOD
æC This method draws the image of the TView object on the screen. This is an empty
method; you must override it, providing all code necessary to draw the contents
of your view. The area parameter is the QuickDraw rectangle that defines the
part of the view that needs to be redrawn; its value is specified in the view’s
local coordinates. You use the area parameter to optimize drawing speed. If
Draw is called by TView.DrawContents, the area parameter represents the visible
portion of the view. MacApp calls the Draw method from methods that display the
TView object’s image. For example, the Draw methods of TView’s subclasses call
INHERITED Draw, and TView’s DrawContents method calls Draw. You must override
Draw in your subclasses to display the screen image of views you have created,
and you can call Draw whenever you want to ensure that the image is drawn on the
screen.
æKY TView.DrawContents
æD PROCEDURE TView.DrawContents;
æFi UMacApp.p
æT METHOD
æC DrawContents draws the TView object and all its subviews. This method is used to
draw the image of the view for printing, to create a Clipboard image, and to
display the view on the screen. It draws the image on the screen only when it is
not drawing to the desk scrap or creating output for the printer. In general,
MacApp calls DrawContents whenever it needs to display a TView object—for
example, when the user manipulates a control or moves a window and reveals part of
another view. You can call DrawContents any time you want to ensure that the
current image of the TView object is correct, but usually you will not need to
call this method yourself.
æKY TView.EachSubView
æD PROCEDURE TView.EachSubView(PROCEDURE DoToSubView(theSubView: TView));
æFi UMacApp.p
æT METHOD
æC EachSubView iterates over all the TView object’s subviews, performing the
DoToSubView procedure on each one in turn. The DoToSubView parameter is a procedure
of one argument that is performed on each subview, but you must declare and
implement this procedure yourself, and the procedure must not be a method. The
procedure you write can have any name that does not conflict with other procedures
in the scope of the TView class. Just as you can create any variable of the
proper type, and then pass it as an argument to a procedure, you can create any
procedure and pass it to EachSubView, as long as the procedure accepts one
argument of type TView. MacApp binds this procedure to the formal parameter
DoToSubView and then calls it with each of the TView object’s subviews bound to the
parameter theSubView. MacApp calls this method when, for example, it activates a
window with a number of subviews, because it must also activate each subview. You
can call EachSubView to perform operations on all of a TView object’s
subviews. You probably will not need to override EachSubView.
æKY TView.Fields
æD PROCEDURE TView.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TView object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TView object,
performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information to
look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display your
fields. Your override must call INHERITED Fields as its last action to ensure
that the inherited fields are also displayed.
æKY TView.FindSubView
æD FUNCTION TView.FindSubView(itsIdentifier: IDType): TView;
æFi UMacApp.p
æT METHOD
æC FindSubView examines the subviews of the TView object. If it finds one that
corresponds to the IDType passed in the itsIdentifier parameter, then it returns
that TView object as its result. Otherwise it returns NIL, unless debugging is
enabled, in which case it writes a message to the Debug Transcript window. MacApp
calls FindSubView from methods that create and manipulate compound TView
objects. For example, MacApp uses FindSubView to determine which dialog item a user
clicks in a dialog box. You can use FindSubView for similar purposes. You
normally will not need to override this method.
æKY TView.FirstSubviewThat
æD FUNCTION TView.FirstSubViewThat
(FUNCTION TestSubView(theSubView: TView): BOOLEAN): TView;
æFi UMacApp.p
æT METHOD
æC FirstSubviewThat tests each subview of the TView object and returns the first
one that matches the specified function’s test. The TestSubView parameter is a
function that the method uses to test each subview in turn until the test
succeeds. You must declare and implement this function yourself. The function you
write can have any name that does not conflict with other functions in the scope of
the TView class. Just as you can create any variable of the proper type and
then pass it as an argument to a procedure, you can create any function and pass
it to FirstSubviewThat, as long as the function accepts one argument of type
TView. MacApp binds this function to the formal parameter DoToSubVie, and then
calls it with each of the TView object’s subviews bound to the parameter
theSubView. MacApp uses FirstSubviewThat to implement the FindSubView function (see
the entry for TView.FindSubView). You can call this method to select subviews for
your own purposes. You probably will not need to override FirstSubviewThat.
æKY TView.Focus
æD FUNCTION TView.Focus: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC Focus sets the clipping rectangle for QuickDraw operations as the rectangle that
encloses the TView object’s screen image and makes a QuickDraw SetOrigin call.
Focus returns the value TRUE if it succeeds in focusing and FALSE if it does
not. MacApp calls Focus for you in all Draw methods. You should call focus in
any TView method besides Draw that draws in the view. Do not change the behavior
of Focus.
æKY TView.FocusOnSuperView
æD FUNCTION TView.FocusOnSuperView: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC FocusOnSuperView sets the clipping rectangle for QuickDraw operations as the
rectangle that encloses this TView object’s superview. The method returns the
value TRUE if it succeeds in obtaining a rectangle or returns the value FALSE if it
does not. MacApp uses FocusOnSuperView when resizing views and when calling
Focus to ensure that it is possible to focus on a view’s superview before trying
to focus on the view itself. You can use it as a general utility when you want
to accomplish a similar purpose, or if you need to draw in the superview of a
particular view. Do not change the behavior of FocusOnSuperView.
æKY TView.ForceRedraw
æD PROCEDURE TView.ForceRedraw;
æFi UMacApp.p
æT METHOD
æC ForceRedraw forces QuickDraw to redraw the entire view image; normally QuickDraw
clips drawing operations to a portion of the view image. MacApp calls
ForceRedraw when some display data has changed and the normal Window Manager updating
mechanisms do not draw the new information. For example, when you change the
pattern in a scroll bar, the new pattern might not appear if the scroll bar’s
rectangle is not automatically added to the window’s update region. ForceRedraw,
however, would force the image to be redrawn. You can use ForceRedraw to ensure
that an entire image will be redrawn. Do not change the behavior of ForceRedraw.
æKY TView.Free
æD PROCEDURE TView.Free;
æFi UMacApp.p
æT METHOD
æC Free releases the memory used by the TView object. It also frees any subviews
the object might have and removes the object from its superview’s list of
subviews. In addition, Free removes the TView object from any associated document and
frees the print handler associated with the view. MacApp calls Free when
initialization of an instance fails and it must release the memory that was allocated
for the object. You usually do not need to call this method yourself.
æKY TView.FreeFromClipboard
æD PROCEDURE TView.FreeFromClipboard;
æFi UMacApp.p
æT METHOD
æC FreeFromClipboard deletes the TView object from the list of Clipboard views
maintained by the view’s associated document. MacApp calls FreeFromClipboard from
methods such as TApplication.AbandonUndoClipboard, or from CheckDeskScrap
methods, which can change the contents of the desk scrap. You can use this method to
remove the contents of a view from the Clipboard.
æKY TView.GetDefaultCursorRgn
æD PROCEDURE TView.GetDefaultCursorRgn(localPoint: Point; cursorRgn: RgnHandle);
æFi UMacApp.p
æT METHOD
æC GetDefaultCursorRgn returns the largest appropriate cursor region. The
localPoint parameter is the location of the mouse pointer in the TView object’s local
coordinates. The cursorRgn parameter is a handle to a region occupied by the
cursor image. DoSetCursor calls GetDefaultCursorRgn to determine the largest
possible cursor region. You can use this method in a similar fashion.
æKY TView.GetDialogView
æD FUNCTION TView.GetDialogView: TView;
æFi UMacApp.p
æT METHOD
æC If the TView object is the subview of a TDialogView object, then GetDialogView
returns that TDialogView object. Otherwise, the method returns NIL. MacApp calls
GetDialogView from certain methods that, to perform their functions, must
refer to a dialog box that contains the view. You can use this method in any method
that requires explicit reference to a TDialogView object that contains the view.
æKY TView.GetExtent
æD PROCEDURE TView.GetExtent(VAR itsExtent: VRect);
æFi UMacApp.p
æT METHOD
æC GetExtent returns a view rectangle, in the view’s local coordinates, that
represents the size of the view. This method stores the boundary rectangle of the
view in the itsExtent parameter. MacApp calls GetExtent from methods such as
ForceRedraw or from mouse-tracking methods that must use a rectangle the size of the
view. You can call GetExtent whenever you need to know the current size of the
TView object’s boundary rectangle.
æKY TView.GetFrame
æD PROCEDURE TView.GetFrame(VAR itsFrame: VRect);
æFi UMacApp.p
æT METHOD
æC GetFrame returns a view rectangle, expressed in global coordinates, that is the
size of the view’s frame. GetFrame stores the rectangle into the itsFrame
parameter. MacApp calls GetFrame from Focus, Resize, and DrawContents methods. You
can use this method when you need to know the rectangle that describes a view’s
frame.
æKY TView.GetGrafPort
æD FUNCTION TView.GetGrafPort: GrafPtr;
æFi UMacApp.p
æT METHOD
æC GetGrafPort returns a pointer to the grafPort currently associated with the
TView object. MacApp calls GetGrafPort from methods that add subviews or create
controls, and it uses the method to assign the correct grafPort to those newly
created views. You usually do not need to call this method yourself.
æKY TView.GetInspectorName
æD PROCEDURE TView.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName constructs a string that is displayed in the Inspector window
as the name of a TView object. The string consists of the characters 'In '
prefixed to the title of the window in which the TView object appears. When the
method returns, it stores the string it constructs in the inspectorName parameter.
MacApp calls GetInspectorName only from the TObjListView.GetItemText method to
determine what name to give the TView object in the Inspector’s list of
objects. You usually do not need to call GetInspectorName.
æKY TView.GetPrintExtent
æD PROCEDURE TView.GetPrintExtent(VAR printExtent: VRect);
æFi UMacApp.p
æT METHOD
æC GetPrintExtent returns the part of the view that is to be printed, representing
it as a view rectangle. The method’s default behavior returns the view’s
dimensions. GetPrintExtent stores the rectangle in the printExtent parameter. MacApp
calls this method from other GetPrintExtent and SetPrintExtent methods. You can
override this method to control what parts of a view are printed.
æKY TView.GetQDExtent
æD PROCEDURE TView.GetQDExtent(VAR qdExtent: Rect);
æFi UMacApp.p
æT METHOD
æC GetQDExtent stores a QuickDraw rectangle, in local QuickDraw coordinates, that
encloses the view’s area on the screen. The method stores the boundary rectangle
in the qdExtent parameter. MacApp calls this method from various drawing
methods and from DoSetCursor methods. You can call it to determine a view’s boundary
rectangle, expressed in local QuickDraw coordinates.
æKY TView.GetScroller
æD FUNCTION TView.GetScroller(immediateSuperView: BOOLEAN): TScroller;
æFi UMacApp.p
æT METHOD
æC GetScroller returns the TScroller object associated with this TView object, if
any. The value of the immediateSuperView parameter should be TRUE if the view’s
scroller is its immediate superview; otherwise, it should be FALSE. MacApp
calls GetScroller when it needs to compute coordinate offsets to draw the contents
of a view. You usually do not need to call GetScroller yourself.
æKY TView.GetVisibleRect
æD PROCEDURE TView.GetVisibleRect(VAR visQDRect: Rect);
æFi UMacApp.p
æT METHOD
æC GetVisibleRect computes a rectangle, expressed in global QuickDraw coordinates,
that contains the visible region of the view. The method stores the resulting
rectangle in the visQDRect parameter. MacApp calls GetVisibleRect from methods
that draw the view’s contents or cause them to scroll, using the rectangle to
determine what part of the view is visible and thus needs to be redrawn. You can
call this method for similar purposes.
æKY TView.GetWindow
æD FUNCTION TView.GetWindow: TWindow;
æFi UMacApp.p
æT METHOD
æC GetWindow returns the TWindow object that contains the TView object to which
GetWindow refers. If there is no such TWindow object, then the method returns NIL.
MacApp calls this method from other methods that must determine what window
contains a given view. You can use GetWindow for the same purpose.
æKY TView.GivePasteData
æD FUNCTION TView.GivePasteData(aDataHandle: Handle; dataType: ResType): LONGINT;
æFi UMacApp.p
æT METHOD
æC GivePasteData stores the current desk scrap of the resource type specified by
dataType into the handle specified by aDataHandle. It returns the error condition
generated by a call to the GetScrap trap using the passed parameters. The
aDataHandle parameter is a handle to a block of memory that will contain the
retrieved desk scrap. The dataType parameter specifies the resource type of the
current desk scrap. MacApp calls GivePasteData from TApplication.GetDataToPaste and
from initialization methods for pasting commands. You probably will not need to
call GivePasteData yourself. You must override GivePasteData to handle your
own data type.
æKY TView.HandleCursor
æD FUNCTION TView.HandleCursor(theMouse: VPoint; cursorRgn: RgnHandle): TView;
æFi UMacApp.p
æT METHOD
æC HandleCursor sets the cursor image to the one associated with this view. This
method enables an application to change the cursor image for a particular view.
The method returns the view that handled the cursor. The parameter theMouse is
the location of the mouse pointer expressed as a local view point. The cursorRgn
parameter is a QuickDraw region that contains the cursor image. MacApp calls
this method when the mouse cursor enters a view; you usually do not need to call
HandleCursor yourself.
æKY TView.HandleMouseDown
æD FUNCTION TView.HandleMouseDown(theMouse: VPoint; VAR info: EventInfo;
VAR hysteresis: Point; VAR theCommand: TCommand): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC HandleMouseDown processes the specified mouse-down event and provides an
appropriate TCommand object to handle undoable actions. The default version calls the
DoMouseCommand method of this TView object. This method returns TRUE if it is
able to return a command object or if a subview handles the command. The
parameter theMouse is the current position of the mouse pointer, expressed in local
view coordinates. The info parameter is the information from the Toolbox event
record describing the mouse-down event; it is used to store the mouse-down event,
in case the DoMouseCommand method needs to examine or change its modifiers.
The hysteresis parameter is a QuickDraw point that represents the horizontal and
vertical distance the mouse can travel between clicks and still be considered
to be at the same location. MacApp uses this parameter to determine whether a
double click has occurred, or the mouse pointer has moved. The parameter
theCommand is the command object that handles the mouse click. MacApp calls
HandleMouseDown when the user clicks the mouse button while the cursor is within the
view. You usually do not need to call HandleMouseDown yourself.
æKY TView.HasPendingUpdate
æD FUNCTION TView.HasPendingUpdate: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC HasPendingUpdate returns the value TRUE if there is a pending update event for
this view; otherwise, the method returns FALSE. MacApp calls this method before
it updates the windows. You can use this method in a similar fashion.
æKY TView.InvalidateFocus
æD PROCEDURE TView.InvalidateFocus;
æFi UMacApp.p
æT METHOD
æC InvalidateFocus indicates that the view's focus is no longer valid and must be
recomputed. MacApp calls this method to invalidate the focus of a view. You can
use this method in a similar fashion.
æKY TView.InvalidRect
æD PROCEDURE TView.InvalidRect(r: Rect);
æFi UMacApp.p
æT METHOD
æC InvalidRect invalidates the rectangle passed to it in r; that is, it adds the
rectangle to the region of the view that must be redrawn. The r parameter is a
QuickDraw rectangle in local coordinates. MacApp calls InvalidRect from several
methods that change the appearance of the screen. You can use InvalidRect to
ensure that certain parts of a view are redrawn when a method changes the display,
but it is normally easier to use InvalidVRect.
æKY TView.InvalidVRect
æD PROCEDURE TView.InvalidVRect(viewRect: VRect);
æFi UMacApp.p
æT METHOD
æC InvalidVRect adds the rectangle specified by viewRect to the region of the view
that must be redrawn. The viewRect parameter specifies the rectangle that is to
be invalidated as a view rectangle in local coordinates. MacApp calls
InvalidVRect from certain methods that change the appearance of the screen. You can
use this method in similar situations to ensure that the view’s image is always
redrawn correctly.
æKY TView.IRes
æD PROCEDURE TView.IRes(itsDocument: TDocument; itsSuperview: TView;
VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC IRes initializes a TView object from a 'view' resource template. The itsDocument
parameter specifies the document associated with the TView object. The
itsSuperView parameter is a reference to the superview in which this view is to be
installed. The itsParams parameter is a pointer to the portion of the 'view'
resource data used to initialize this view. When the IRes method finishes
initializing the view, the method moves the pointer to the end of this data. MacApp
calls this method for each of the views created from a 'view' resource template,
usually in response to a NewTemplateWindow or a DoCreateViews call. You never need
to call IRes yourself.
æKY TView.IsDoneTracking
æD FUNCTION TView.IsDoneTracking: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC This method indicates whether the tracker is through tracking. The default is to
return the value FALSE while the user continues to hold down the mouse button,
and return the value TRUE when the releases the mouse button. You usually do
not need to call this method, although you still must deal with queued events if
you change the criteria for TRUE.
æKY TView.IsFocused
æD FUNCTION TView.IsFocused: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsFocused returns the value TRUE if the currently focused view is equal to SELF.
MacApp calls this method from a variety of other methods that draw in views.
You can use IsFocused to determine whether a view is ready for drawing; if
IsFocused returns the value FALSE, then QuickDraw operations will occur in a
grafPort that does not belong to the view.
æKY TView.IsShown
æD FUNCTION TView.IsShown: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsShown returns the value TRUE if the view is visible on the screen. MacApp
calls IsShown when it focuses on a view. You can use this method whenever you need
to determine whether a view is visible on the screen.
æKY TView.IsViewEnabled
æD FUNCTION TView.IsViewEnabled: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsViewEnabled returns the value TRUE if the view is currently enabled. MacApp
uses IsViewEnabled to determine how to handle mouse clicks and the mouse pointer.
You can use it for similar purposes.
æKY TView.IsVisible
æD FUNCTION TView.IsVisible: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsVisible returns the value TRUE if any portion of the view is currently visible
when focused. MacApp calls IsVisible, for example, from TView.Activate to
determine if the selection needs to be highlighted. You can use IsVisible in a
similar fashion.
æKY TView.IView
æD PROCEDURE TView.IView(itsDocument: TDocument; itsSuperview: TView;
itsLocation: VPoint; itsSize: VPoint; itsHSizeDet, itsVSizeDet: SizeDeterminer);
æFi UMacApp.p
æT METHOD
æC IView initializes the instance variables of the TView object using the values in
the passed parameters. The itsDocument parameter is a reference to the
TDocument object with which the TView object is to be associated. The itsSuperView
parameter is a reference to the superview in which this view is to be installed.
The itsLocation parameter is a view point in the superview that specifies the
position of this view’s top-left corner. The itsSize parameter is the view’s
initial size expressed as a view point. The itsHSizeDet and itsVSizeDet parameters
determine how the view’s horizontal and vertical dimensions are calculated,
respectively. These values include sizeSuperView (the view is the same size as its
superview, sizeRelSuperView (the view size is relative to the superview’s
size), sizePage (the view is the size of one page), sizeFillPages (the view expands
to fill an exact number of pages), sizeVariable (the view size fluctuates
according to application-specific criteria), or sizeFixed (the size is fixed at the
time the view is created).
æKY TView.LastSubViewThat
æD FUNCTION TView.LastSubViewThat
(FUNCTION TestSubView(theSubView: TView): BOOLEAN): TView;
æFi UMacApp.p
æT METHOD
æC LastSubViewThat returns the last member of the list in the fSubViews field that
matches the test passed in TestSubView. You must define the function
TestSubView yourself. It can have any name you like, just as a variable that you pass
to a formal parameter can have any name you like. The function should accept one
argument of type TView and return a Boolean result. If no member of the
fSubViews list causes TestSubView to return TRUE, then LastSubViewThat returns NIL.
MacApp calls LastSubViewThat from methods that handle the mouse pointer. You can
use it any time you need to select a subview on the basis of some arbitrary test.
æKY TView.LocalToSuper
æD PROCEDURE TView.LocalToSuper(VAR thePoint: VPoint);
æFi UMacApp.p
æT METHOD
æC LocalToSuper converts a view point from the TView object’s local coordinate
system to that of its superview. thePoint is the point to be converted when the
method is called, and when the method returns it is the converted value. MacApp
does not normally use LocalToSuper. It is provided as a utility routine in case
an application should need to convert between the coordinate systems of a view
and its superview.
æKY TView.LocalToWindow
æD PROCEDURE TView.LocalToWindow(VAR thePoint: VPoint);
æFi UMacApp.p
æT METHOD
æC LocalToWindow converts the passed point from the view’s local coordinate system
to that of the window in which it is installed. The thePoint parameter is a
MacApp view point in the view’s local coordinates when the method is called. When
the method returns thePoint is the converted value. MacApp does not normally
call this method. It is provided as a utility routine for use when you need to
convert a point in a view to the coordinate system of its window.
æKY TView.Locate
æD PROCEDURE TView.Locate(h, v: VCoordinate; invalidate: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Locate adjusts the focus and validation of the view, its subviews, and its
superview. The h and v parameters specify the new location of the view’s upper-left
corner in the superview's coordinates. The h parameter is the horizontal
coordinate of the upper-left corner of the view’s new location. The v parameter is
the vertical coordinate of the upper-left corner of the view’s new location. The
invalidate parameter specifies whether MacApp should force the view to redraw
itself; if invalidate is set to TRUE, then the view is redrawn. MacApp calls
Locate from methods that adjust the size or shape of views. You usually do not
need to call this method yourself.
æKY TView.MakeFirstSubView
æD PROCEDURE TView.MakeFirstSubView(theSubView: TView);
æFi UMacApp.p
æT METHOD
æC MakeFirstSubView makes the passed TView object the first item in the fSubViews
field. If the subview is already in the fSubViews list, its reference is deleted
and reinserted at the front of the list. The theSubView parameter is an object
of type TView; it becomes the new head of the view’s fSubViews list. MacApp
does not normally call this method. It is provided as a utility routine for
managing windows with complex sets of subviews.
æKY TView.MakeLastSubView
æD PROCEDURE TView.MakeLastSubView(theSubView: TView);
æFi UMacApp.p
æT METHOD
æC MakeLastSubView makes the passed TView object the last item in the fSubViews
field. If the subview is already in the fSubViews list, its reference is deleted
and reinserted at the back of the list. The parameter theSubView is an object of
type TView; it becomes the new last item of the view’s fSubViews list. MacApp
does not normally call this method. It is provided as a utility routine for
managing of windows with complex sets of subviews.
æKY TView.Open
æD PROCEDURE TView.Open;
æFi UMacApp.p
æT METHOD
æC Open performs any initial behavior that might be appropriate when a view is
first displayed on the screen. The default version does nothing except call the
Open methods of all its subviews. MacApp calls Open from other methods that create
views, such as those that create windows. You can override it to provide your
views special behavior when views are created.
æKY TView.PageInteriorChanged
æD PROCEDURE TView.PageInteriorChanged(newInterior: Rect);
æFi UMacApp.p
æT METHOD
æC PageInteriorChanged enables a view to perform specialized actions when its page
interior rectangle is changed. The default version does nothing. The
newInterior parameter is the rectangle that defines the page interior of the view for
printing purposes. It is expressed as a QuickDraw rectangle in view coordinates.
MacApp calls PageInteriorChanged from TView.RedoPageBreaks, so that any code you
have written in overridden versions of this method will run. You usually do
not need to call this method yourself. You must override it if you want it to do
anything.
æKY TView.QDToViewPt
æD PROCEDURE TView.QDToViewPt(qdPoint: Point; VAR viewPt: VPoint);
æFi UMacApp.p
æT METHOD
æC QDToViewPt converts a point in QuickDraw coordinates to the same point expressed
in MacApp’s view coordinates. QuickDraw uses a 16-bit coordinate system, and
MacApp uses its own 32-bit coordinate system. The qdPoint parameter is the
QuickDraw point to be converted. The viewPt parameter should be a variable of type
VPoint; it will contain the converted point when the method returns. MacApp
calls QDToViewPt when it needs to convert between the MacApp and QuickDraw
coordinate systems. You can use this method for the same purpose.
æKY TView.QDToViewRect
æD PROCEDURE TView.QDToViewRect(qdRect: Rect; VAR viewRect: VRect);
æFi UMacApp.p
æT METHOD
æC QDToViewRect converts a rectangle in QuickDraw coordinates to the same rectangle
expressed in MacApp’s view coordinates. QuickDraw uses a 16-bit coordinate
system, and MacApp uses its own 32-bit coordinate system. The qdRect parameter is
the QuickDraw rectangle to be converted. The viewRect parameter should be a
variable of type VRect; it will contain the converted rectangle when the method
returns. MacApp calls QDToViewRect when it needs to convert between the MacApp
and QuickDraw coordinate systems. You can use this method for the same purpose.
æKY TView.RemoveSubView
æD PROCEDURE TView.RemoveSubView(theSubView: TView);
æFi UMacApp.p
æT METHOD
æC RemoveSubView removes the specified TView object from the view’s fSubViews list.
The theSubView parameter specifies the TView object to be removed. MacApp
calls RemoveSubView from certain methods, such as TView.Free, that change what
subviews are installed in a view. You can use RemoveSubView when you need to remove
a subview from a view.
æKY TView.Resize
æD PROCEDURE TView.Resize(width, height: VCoordinate; invalidate: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Resize changes the size of the view as displayed on the screen, redrawing if
requested. The width parameter is the view’s new horizontal dimension, expressed
in view coordinates. The height parameter is the view’s new vertical dimension,
expressed in view coordinates. If you set the value of the invalidate parameter
to TRUE, the view is invalidated, forcing it to be redrawn in the update
process. When you know the view will be redrawn eventually and wish to avoid drawing
it twice—which makes the screen appear to flash—you can set the invalidate
parameter to FALSE. Resize is a general-purpose utility that MacApp calls to
change the size of a view. You can use it in a similar fashion.
æKY TView.RevealBottom
æD PROCEDURE TView.RevealBottom(redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC RevealBottom causes the bottom-right point of the view to scroll into view. The
redraw parameter should be set to TRUE if the area is to be redrawn. MacApp
does not normally call RevealBottom. It is provided as a utility for manipulating
views.
æKY TView.RevealRect
æD PROCEDURE TView.RevealRect(rectToReveal: VRect; minToSee: Point; redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC RevealRect causes a specified rectangle within a view to scroll into view on the
screen. The rectToReveal parameter is the rectangle to reveal in the view’s
local coordinates. The minToSee parameter specifies a minimum area that must be
made visible. The redraw parameter should be TRUE if the revealed rectangle
should be redrawn. The default version of RevealRect uses only the rectToReveal
parameter; the other parameters are provided for use by overridden versions of the
method. MacApp calls RevealRect from certain methods that make specified parts
of a view visible, particularly, from ScrollSelectionIntoView methods of
TTEView objects. You can use RevealRect for scrolling and selection control in a
similar fashion.
æKY TView.RevealTop
æD PROCEDURE TView.RevealTop(redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC RevealTop causes the top-left point of the view to scroll into view. The redraw
parameter should be set to TRUE if the area is to be redrawn. MacApp does not
normally call RevealTop. It is provided as a utility for manipulating views.
æKY TView.Show
æD PROCEDURE TView.Show(state, redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC Show displays the view on the screen and optionally forces it to redraw its
image. Set the state parameter to TRUE to show the view or to FALSE to hide the
view. The redraw parameter should be set to TRUE if the view should be forced to
redraw itself. MacApp calls Show from the Open and Close methods of the TWindow
class. You can call it when you need to force a view to be shown on the screen.
æKY TView.ShowReverted
æD PROCEDURE TView.ShowReverted;
æFi UMacApp.p
æT METHOD
æC ShowReverted adjusts the view’s size, redraws the view, and calls the
ShowReverted method of all subviews. MacApp calls ShowReverted from
TDocument.ShowReverted when the user chooses the Revert command and confirms.
You must override ShowReverted to provide any actual behavior in this circumstance.
æKY TView.SubViewChangedSize
æD PROCEDURE TView.SubViewChangedSize(theSubView: TView; delta: VPoint);
æFi UMacApp.p
æT METHOD
æC SubViewChangedSize performs appropriate actions when one of a view’s subviews
changes size. The default version does nothing. The parameter theSubView is the
subview that has changed. The delta parameter is a MacApp view point that
specifies the subview’s new size. MacApp’s Resize methods include a call to the
SubViewChangedSize method of the superview, so this method is called whenever a view
calls the Resize method and has a superview. You usually do not need to call
this method yourself. You can override SubViewChangedSize to provide special
behavior when a view changes size.
æKY TView.SubViewMoved
æD PROCEDURE TView.SubViewMoved(theSubView: TView);
æFi UMacApp.p
æT METHOD
æC SubViewMoved performs any special actions that are appropriate when a view’s
subviews move. The default version does nothing. The parameter theSubView is the
subview that moved. MacApp calls this method from a subview’s Locate method, so
it is executed when a view moves and has a superview. You usually do not need
to call this method yourself. You can override this method to provide special
behavior when a view moves.
æKY TView.SuperToLocal
æD PROCEDURE TView.SuperToLocal(VAR thePoint: VPoint);
æFi UMacApp.p
æT METHOD
æC Given a point in a superview’s local coordinates, SuperToLocal returns the same
point in the view’s local coordinate system. When the method is called, the
parameter thePoint is the point in the superview’s coordinates. When the method
returns, thePoint is the converted point. MacApp calls SuperToLocal in certain
methods, such as HandleCursor and HandleMousedown, that must calculate the
location of a point in a view’s subviews. You can use SuperToLocal for similar
purposes.
æKY TView.SuperViewChangedSize
æD PROCEDURE TView.SuperViewChangedSize(delta: VPoint; invalidate: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SuperViewChangedSize provides special behavior when a view’s superview changes
size. It determines whether the view needs to be resized in response to a change
in its superview, and, if so, changes the view accordingly. The delta
parameter is a VPoint value that specifies the change in the superview’s size. If the
invalidate parameter is set to TRUE, then the view’s rectangle is redrawn.
MacApp calls this method when the size of the view’s superview changes. You can
override it to provide special behavior in such circumstances. You usually do not
need to call SuperViewChangedSize yourself.
æKY TView.SuperViewMoved
æD PROCEDURE TView.SuperViewMoved(invalidate: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC SuperViewMoved provides special behavior when a view’s superview moves. The
default version does nothing. If the invalidate parameter is set to TRUE then the
view will be redrawn. MacApp calls SuperViewMoved from the Locate methods of
superviews. You can override this method to provide special behavior when the
superview moves. You usually do not need to call SuperViewMoved yourself.
æKY TView.TrackConstrain
æD PROCEDURE TView.TrackConstrain(anchorPoint, previousPoint: VPoint;
VAR nextPoint: VPoint);
æFi UMacApp.p
æT METHOD
æC TrackConstrain allows a view to constrain the mouse while it is being tracked.
It is an empty method; you must provide all code necessary to constrain the
mouse in any way your application requires. The anchorPoint parameter is the
location of the mouse pointer, in view coordinates, when the mouse button was clicked
in the view. The previousPoint parameter represents the location of the mouse
when it was last tracked. The nextPoint parameter is the current location of
the mouse, in view coordinates. Your override version of this method constrains
the mouse by changing the value of nextPoint appropriately. You usually do not
call this method yourself—instead, MacApp sends a message to
TApplication.TrackMouse as the mouse moves, and TrackMouse calls
TControlTracker.TrackConstrain. The TControlTracker command object calls the
appropriate TrackConstrain, TrackMouse, and TrackFeedback methods. When the value of
the TControlTracker object’s fContrainsMouse field is TRUE, mouse movement is
constrained. The default value of fConstrainsMouse is FALSE. (For further information
on mouse trackers, see the discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TView.TrackFeedback
æD PROCEDURE TView.TrackFeedback(anchorPoint, nextPoint: VPoint; turnItOn,
mouseDidMove: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC TrackFeedback provides onscreen feedback for the user while the mouse is being
tracked (that is, while the mouse button is pressed and a mouse-tracker object
exists). The default version provides “rubber-band” feedback: a dotted-line box
between the mouse pointer’s position when the mouse button was first pressed
and its current position. The anchorPoint parameter is the position of the mouse
pointer, in view coordinates, when the mouse button was pressed. The nextPoint
parameter is the mouse pointer’s current position, described in view
coordinates. The value of the turnItOn parameter is TRUE if the feedback is to be
enabled. The value of the mouseDidMove parameter is TRUE if the mouse moved more than
the hysteresis value since the last time TrackFeedback was called. (MacApp uses
the hysteresis value, supplied by TApplication.TrackMouse, to determine if
multiple mouse clicks are close enough on the screen to be considered part of a
double or triple click.) MacApp calls TrackFeedback twice for every call to
TrackConstrain and TrackMouse. The first time it is called with turnItOn set to
FALSE; the second time, with turnItOn set to TRUE. This technique makes it easy to
implement feedback such as a drawing the dashed outline of a box from the
anchor point to the current mouse location. (Note that not all feedback is done this
way; sometimes it is more convenient to implement feedback in the TrackMouse
method. For example, tracking a button calls for highlighting the button when
the mouse pointer enters the button, and removing highlighting from the button
when the pointer leaves it.) You usually do not need to call TrackFeedback
yourself; TApplication.TrackMouse calls this method as necessary when MacApp
intercepts mouse-down events. However, you can override this method to provide other
kinds of feedback while tracking the mouse. (For further discussion of mouse
trackers, see the discussion of mouse operations in the MacApp 2.0 Cookbook.)
æKY TView.TrackMouse
æD PROCEDURE TView.TrackMouse(aTrackPhase: TrackPhase; VAR anchorPoint, previousPoint,
nextPoint: VPoint; mouseDidMove: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method carries out any mouse-tracking activity required by the view, other
than that implemented in TrackConstrain and TrackFeedback. It is an empty
method; you must provide all code necessary to track the mouse in any way your view
requires. The aTrackPhase parameter describes the current phase of the
mouse-tracking process. MacApp sets its value to trackPress when the mouse button is
first pressed. When the mouse has moved more than the hysteresis value since the
last time TrackFeedback was called, MacApp sets the value of the aTrackPhase
parameter to trackMove. When the mouse button is released, MacApp sets
aTrackPhase to trackRelease. When aTrackPhase is set to trackPress, all three points
(anchorPoint, previousPoint, and nextPoint) have the same value. When aTrackPhase
is set to trackRelease, the nextPoint parameter contains the coordinates of the
location of the mouse-up event. The anchorPoint parameter is the position of
the mouse pointer, in view coordinates, when the mouse button was first pressed.
If you change this value, the new value is passed to you in the parameter
aTrackPhase the next time TrackMouse is called. The previousPoint parameter is the
position, in view coordinates, of the mouse pointer the last time TrackMouse was
called. The nextPoint parameter is the current position of the mouse pointer,
in view coordinates. Although you can change the value of nextPoint yourself,
it is preferable to use TCommand.TrackConstrain to limit mouse movement. The
value of nextPoint at the time TrackMouse exits will be passed to you as the value
of previousPoint the next time TrackMouse is called. MacApp sets the value of
the mouseDidMove parameter to TRUE if the mouse moved since the last time
TCommand.TrackFeedback was called. However, SELF.TrackConstrain may set the mouse
coordinates back to values as if no movement had occurred; thus, the mouse has
not necessarily moved the first time TrackMouse is called with aTrackPhase set to
trackMove. Test the value of mouseDidMove to determine whether you should
consider the mouse to have moved. The mouseDidMove parameter will have the value
TRUE if aTrackPhase has a value of either trackPress or trackRelease; otherwise,
its value is TRUE if nextPoint and previousPoint are not equal. You never call
TView.TrackMouse yourself; rather, TApplication.TrackMouse calls it when the
mouse button is first pressed, as the mouse moves, and when the mouse button is
released. You often override this method to take application-specific action.
(For further information on mouse trackers, see the discussion of mouse
operations in the MacApp 2.0 Cookbook.)
æKY TView.Update
æD PROCEDURE TView.Update;
æFi UMacApp.p
æT METHOD
æC Update draws the contents of the view in the window to which it belongs. MacApp
calls Update from HandleUpdateEvent, Activate, and DoScroll methods. You
usually do not need to call this method yourself. If you want to change the way views
draw their contents, you should probably override DrawContents and leave
Update unchanged.
æKY TView.ValidVRect
æD PROCEDURE TView.ValidVRect(viewRect: VRect);
æFi UMacApp.p
æT METHOD
æC ValidVRect validates the visible portion of the specified view rectangle so that
it is not redrawn by the MacApp updating process. This optimization can
prevent unwanted blinking and speed up redrawing. The viewRect parameter is the
rectangle to be validated, expressed as a MacApp view rectangle. ValidVRect is a
utility routine provided for your use. You can use it to optimize speed and
appearance of redrawing operations.
æKY TView.ViewEnable
æD PROCEDURE TView.ViewEnable(state, redraw: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC ViewEnable enables or disables a view and specifies whether it is to be redrawn.
The value of the state parameter becomes the new value of the TView object’s
fViewEnabled field. If the redraw parameter is set to TRUE, then the view is
redrawn. MacApp uses ViewEnable to control the states of dialog items. You can use
it similarly, and to enable or disable TView objects of your own design. The
meaning of the fViewEnabled field is determined by the nature of each specific
TView class that uses it.
æKY TView.ViewToQDPt
æD FUNCTION TView.ViewToQDPt(viewPt: VPoint): Point;
æFi UMacApp.p
æT METHOD
æC ViewToQDPt converts a MacApp view point to the corresponding local QuickDraw
point and returns the converted point. The viewPt parameter is the view point to
be converted. MacApp calls ViewToQDPt from a variety of drawing and mouse-handling
methods that must convert between MacApp and QuickDraw coordinates. You can
use this method for the same purpose.
æKY TView.ViewToQDRect
æD PROCEDURE TView.ViewToQDRect(viewRect: VRect; VAR qdRect: Rect);
æFi UMacApp.p
æT METHOD
æC ViewToQDRect converts a MacApp view rectangle to the corresponding QuickDraw
rectangle in local coordinates. The viewRect parameter is the view rectangle to be
converted. The qdRect parameter is the converted rectangle when the method
returns. MacApp calls this method from a variety of drawing and sizing methods
that must convert between the MacApp and QuickDraw representations of rectangles.
You can use this method for the same purpose.
æKY TView.WindowToLocal
æD PROCEDURE TView.WindowToLocal(VAR thePoint: VPoint);
æFi UMacApp.p
æT METHOD
æC WindowToLocal converts a point in the coordinates of the window in which the
view appears to the view’s local coordinates. More generally, this method converts
from the coordinate system of the TView object at the top of a view hierarchy
to the coordinate system of the object making the call to WindowToLocal. The
parameter thePoint is the point to be converted on entry; when the method
returns, it is the converted point. This method is provided as a utility for
coordinate conversion. You can use it whenever you need to make a conversion from the
coordinates in a window to the coordinates of any view in its view hierarchy.
æKY TView.WRes
æD PROCEDURE TView.WRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC WRes writes the TView portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the TView
section of the view’s resource template. WRes is the inverse of the IRes method,
and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are active on
the screen. You rarely need to call this method yourself. You must override
this method in your subclasses to create your own 'view' resources. Your override
should check the size of the space remaining in the template past the end of
the previously-written resource data; if there is not enough space to write your
data into the file, your override should call the global routine ExpandPtr,
passing as arguments the current values of theResource, itsParams, and the size
of your resource data, in bytes. ExpandPtr expands the 'view' resource handle by
the amount you specify, or by kViewRsrcExpandAmt, whichever is greater. You
need not be concerned about making the 'view' resource handle too big, because
MacApp reclaims unused space by returning a new value for itsParams when the WRes
method completes.
æKY TView.WriteRes
æD PROCEDURE TView.WriteRes(theResource: ViewRsrcHndl; VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('view') and
class name ('TView') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the view’s
resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a TView
object as part of a 'view' resource; you can use it in a similar fashion. You can
override this method to provide your own unique class name or signature.
æKY TView.WriteToDeskScrap
æD PROCEDURE TView.WriteToDeskScrap;
æFi UMacApp.p
æT METHOD
æC WriteToDeskScrap draws the contents of the view in a QuickDraw picture and then
stores this picture as a 'PICT' resource in the desk scrap. MacApp calls
WriteToDeskScrap from TApplication.AboutToLoseControl when the application is about
to become inactive. You can use WriteToDeskScrap as a default method for storing
the contents of a view in the Clipboard. You usually do not need to call this
method yourself. You must override the method to provide more specialized
behavior, such as storing a selected area in the Clipboard.
æKY TWindow.Activate
æD PROCEDURE TWindow.Activate (entering: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Activate activates or deactivates a window and its subviews based on the value
of the entering parameter. Set the entering parameter to TRUE to activate the
window or to FALSE to deactivate the window. If the value of entering is
different from the value of the window’s fIsActive field, then this method calls the
window’s DrawContents method and INHERITED Activate. If the value of the entering
parameter is TRUE, the Activate method activates the window’s subviews. What
happens next depends on the value of entering. If the value of entering is TRUE,
then gFrontWindow is set to SELF, the application’s target is set to the
window’s fTarget, and gDocument is set to the window’s fDocument. If the value of
entering is FALSE, then the window’s fTarget is set to the application’s current
target, the application’s target is set to gApplication, gFrontWindow and
gDocument are set to NIL, and the cursor is set to the arrow. Finally, the window’s
size box is redrawn, and fIsActive is set to the value of entering. You can
override Activate for windows that require additional activation or deactivation
logic, in which case you usually call INHERITED Activate as part of your
override method. Activate is called by TApplication.HandleActivateEvent to activate or
deactivate a window; it is also called by TWindow.Close to deactivate a window
that is being closed. You can call Activate when you need to activate or
deactivate the Window Manager window associated with a TWindow object.
æKY TWindow.AdaptToScreen
æD PROCEDURE TWindow.AdaptToScreen;
æFi UMacApp.p
æT METHOD
æC AdaptToScreen adjusts the size of the window to fit the primary screen of the
computer on which the application is being run. AdaptToScreen does not change the
window’s fSize field. MacApp calls AdaptToScreen before the window is opened
and AdaptToScreen calls the Resize method, which calls the Toolbox routine
SizeWindow to adjust fSize during Open. You can use this method in a similar
fashion.
æKY TWindow.AllowsMenuAccess
æD FUNCTION TWindow.AllowsMenuAcces: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC AllowsMenuAccess returns the value TRUE if the menus are accessible when this
window is the frontmost. By default, this method allows menu access—that is,
returns TRUE—regardless of whether the window is modal or modeless.
AllowsMenuAccess is called by TApplication.InModalMenuState to test whether a window
allows menu access. You can use this method in a similar fashion.
æKY TWindow.BuildWindowRgns
æD FUNCTION TWindow.BuildWindowRgns(build: BOOLEAN): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC BuildWindowRgns, if the build parameter is set to kBuild, ensures that the
window regions are valid and sets the fContRgnInset and fContDifference fields. The
method returns the value TRUE if the windows were previously built. The build
parameter specifies whether or not to build the window regions. You probably
will not need to call this method yourself.
æKY TWindow.Center
æD PROCEDURE TWindow.Center(horizontally, vertically: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC This method centers the window on the main screen horizontally, vertically, or
both. If the value of the horizontally parameter is TRUE, the window will be
centered horizontally. If the value of the vertically parameter is TRUE, the
window will be centered vertically. TWindow.Open calls Center to center the window.
You can use the method in a similar fashion.
æKY TWindow.Close
æD PROCEDURE TWindow.Close; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method closes a window and notifies its subviews that their window is being
closed. If the value of fFreeOnClosing is TRUE, Close also calls TWindow.Free
to release memory used by the TWindow object. MacApp calls this method, for
example, to close an associated window when a document is closed. You probably
will not need to call this method. You can override Close for windows that need
extra processing when they are closed, in which case you will usually call
INHERITED Close as part of your override method.
æKY TWindow.CloseByUser
æD PROCEDURE TWindow.CloseByUser;
æFi UMacApp.p
æT METHOD
æC CloseByUser closes the active window when the user clicks the window’s close box
or chooses the Close menu command. If the value of the window’s
fClosesDocument field is TRUE, or if this is the document’s only window, this method
also closes the document associated with the window. MacApp calls CloseByUser when the
user clicks a window's close box. You probably will not need to call this
method yourself.
æKY TWindow.DoMenuCommand
æD FUNCTION TWindow.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoMenuCommand closes TWindow windows when the user chooses the Close menu
command. Otherwise, it calls INHERITED DoMenuCommand to return the command to the
command chain. The parameter aCmdNumber is the command number defined for the
selected menu item—in this case, the Close command normally found in an
application’s File menu. The Close command is predefined by MacApp in the file
UMacApp.p; you may define other command numbers yourself in your 'cmnu' resource
description and in the appropriate interface or implementation file. MacApp calls
DoMenuCommand when the user chooses the Close command from a menu. You usually do not
need to call this method yourself.
æKY TWindow.DoSetupMenus
æD PROCEDURE TWindow.DoSetupMenus; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC DoSetupMenus enables menu commands to which the TWindow object’s DoMenuCommand
method can respond. If the window is not modal—that is, if the value of fIsModal
is FALSE— this method also calls INHERITED DoSetupMenus, which prevents
enabling menus whose scope is beyond that of the modal window itself. DoSetupMenus is
called by TApplication.SetupTheMenus. You usually do not need to call this
method yourself. If you override this method in your subclasses,your override must
call INHERITED DoSetupMenus as its first action, to allow other handlers to
enable menu items to which they can respond.
æKY TWindow.DrawContents
æD PROCEDURE TWindow.DrawContents; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method calls INHERITED DrawContents and then draws the size box (if the
window has one) by calling DrawResizeIcon. MacApp calls DrawContents from
TWindow.Update to update the windows. You usually do not need to call it yourself.
æKY TWindow.DrawResizeIcon
æD PROCEDURE TWindow.DrawResizeIcon;
æFi UMacApp.p
æT METHOD
æC This method draws the window’s size box. DrawResizeIcon is called by
TWindow.Activate and TWindow.DrawContents to draw the size box icon in a window when
it is made active. You can use this method in a similar fashion.
æKY TWindow.Fields
æD PROCEDURE TWindow.Fields(PROCEDURE DoToField(fieldName: Str255; fieldAddr: Ptr;
fieldType: INTEGER)); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Fields reports the contents of each field of the TWindow object to the MacApp
Inspector. DoToField is a procedure that MacApp passes to Fields to report the
contents of each field. Fields iterates over all the fields of the TWindow
object, performing DoToField on each one. The fieldName parameter is the name of the
field. The fieldAddr parameter is the field’s location in memory. The fieldType
parameter uses a predefined constant to tell Fields what type of information
to look for in a field. MacApp calls Fields from the MacApp Inspector. You must
override this method in your subclasses if you want the Inspector to display
your fields. Your override must call INHERITED Fields as its last action to
ensure that the inherited fields are also displayed.
æKY TWindow.Focus
æD FUNCTION TWindow.Focus: BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC If the value of the window’s fWMgrWindow field is not NIL, this method focuses
the window; it sets the port to the window’s port, sets the port’s origin to
(0,0), sets the value of gLongOffset to (0,0), and sets the port’s clipping region
to the visRgn. It returns the value TRUE if the window could be focused and
the window is visible. It returns the value FALSE if the value of the window’s
fWMgrWindow is NIL or if the window is not visible. MacApp calls Focus before
performing any graphics operation on a view (remember, windows are views). You can
use this method in a similar fashion.
æKY TWindow.FocusOnSuperView
æD FUNCTION TWindow.FocusOnSuperView: BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC FocusOnSuperView always returns the value FALSE because in MacApp a window has
no superview. This method is provided for use by TInspectWindow. You usually do
not need to call this method.
æKY TWindow.ForceOnScreen
æD PROCEDURE TWindow.ForceOnScreen;
æFi UMacApp.p
æT METHOD
æC ForceOnScreen ensures that some part of the window is visible on the primary
screen; for applications that attempt to reopen windows in the last saved
location, a problem can occur when switching from a system with a large screen to a
system with a small screen: It is possible for a window to be visible on the large
screen but not visible on the small screen. ForceOnScreen prevents this
problem. ForceOnScreen does not change the window’s fSize field. MacApp calls
ForceOnScreen before the window is opened, and ForceOnScreen calls the Toolbox routine
SizeWindow to adjust fSize while the window is being opened. You can use this
method in a similar fashion.
æKY TWindow.Free
æD PROCEDURE TWindow.Free; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Free removes the window from its document’s window list, or, if there is no
document, from the application’s free window list. It then calls INHERITED Free to
release the memory used by dependent structures. MacApp calls Free when the
user closes a window or a document associated with the window. You usually do not
need to call this method yourself; however, if you do call it, you must not
refer to any fields or methods of SELF.
æKY TWindow.GetGlobalBounds
æD PROCEDURE TWindow.GetGlobalBounds(VAR globalBounds: Rect);
æFi UMacApp.p
æT METHOD
æC GetGlobalBounds returns the rectangle, expressed in global coordinates, defining
the boundaries of the window. The globalBounds parameter is the rectangle that
defines the area in which the window will be drawn. GetGlobalBounds is called
by the following TWindow methods that adjust a window's size or location:
AdaptToScreen, Center, ForceOnScreen, and SimpleStagger. GetGlobalBounds is also
called by TApplication.TrackCursor to find out if the cursor is in a window. You
can use this method in a similar fashion.
æKY TWindow.GetGrafPort
æD FUNCTION TWindow.GetGrafPort: GrafPtr; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetGrafPort returns the value of the window’s fWMgrWindow field. Several methods
call TWindow.GetGrafPort. TWindow.Focus calls it to test an existing port's
validity or to set a new port. GetGrafPort is also called by
TWindow.GetGlobalBounds to obtain a value to store in the globalBounds variable. If
the application is compiled with debugging code installed, TWindow.DrawResizeIcon
calls GetGrafPort to test the validity of the port in which it is about to draw. You
can call GetGrafPort when you want to obtain a window's grafPtr.
æKY TWindow.GetInspectorName
æD PROCEDURE TWindow.GetInspectorName(VAR inspectorName: Str255); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetInspectorName retrieves the name of the Window Manager window associated with
the TWindow object. When the method returns, it stores the name of the Window
Manager window in the inspectorName parameter. MacApp calls GetInspectorName
when displaying information about TWindow objects in the Inspector window. You
usually do not need to call this method yourself.
æKY TWindow.GetMaxIntersectedDevice
æD FUNCTION TWindow.GetMaxIntersectedDevice(VAR screenRect: Rect): GDHandle;
æFi UMacApp.p
æT METHOD
æC GetMaxIntersectedDevice returns the screenRect of the most intersected device
and its GDHandle, or if Color QuickDraw isn't available it returns GetGrayRgn
intersected with screenbits.bounds and NIL for the GDHandle. The screenRect
parameter is the screenRect of the most intersected device.
æKY TWindow.GetTitle
æD PROCEDURE TWindow.GetTitle(VAR theTitle: Str255);
æFi UMacApp.p
æT METHOD
æC GetTitle returns the title of the window—that is, the contents of the
fWMgrWindow field. The parameter theTitle is the title of the Window Manager window
associated with this TWindow object. The following methods call GetTitle to obtain a
window's name: TStdPrintHandler.GetDocName, TView.GetInspectorName,
TWindow.GetInspectorName, TWindow.IRes, TWindow.IWindow, TApplication.OpenNew,
TWindow.SetTitleForDoc, and TWindow.WRes. You can use this method in a similar fashion.
æKY TWindow.GetWindow
æD FUNCTION TWindow.GetWindow: TWindow; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC GetWindow returns a reference to itself; that is, it returns SELF.
æKY TWindow.GoAwayByUser
æD PROCEDURE TWindow.GoAwayByUser(globalMouse: Point);
æFi UMacApp.p
æT METHOD
æC When the user clicks in the window's close box, GoAwayByUser tracks the mouse
pointer while the mouse button is pressed, highlighting the window's close box
while the pointer is in it. If the mouse button is released while the pointer is
in the close box, GoAwayByUser closes the window. If the document has no other
windows, this method also closes the document. The globalMouse parameter is the
point, expressed in global coordinates, where the user first clicked in the
window's close box. GoAwayByUser is called by TApplication.HandleMouseDown and
TDebugApplication.HandleMouseDown to handle mouse clicks in a TWindow or
TDebugWindow object's close box. You never need to call GoAwayByUser yourself.
æKY TWindow.HandleMouseDown
æD FUNCTION TWindow.HandleMouseDown(theMouse: VPoint; VAR info: EventInfo;
VAR hysteresis: Point; VAR theCommand: TCommand): BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC HandleMouseDown first brings the window to the front by calling the window’s
Select method. If the value of the fDoFirstClick field is TRUE, HandleMouseDown
updates the window and calls INHERITED HandleMouseDown. If the window is already
in front, HandleMouseDown simply calls INHERITED HandleMouseDown. The parameter
theMouse is the mouse pointer’s position, expressed as a local view point. The
info parameter is used to store the mouse-down event, in case the
HandleMouseDown method needs to examine or change its modifiers. The hysteresis
parameter is a QuickDraw point that represents the vertical and horizontal distance
the pointer can travel between clicks and still be considered to be at the same
location. MacApp uses this parameter to determine whether a double click occurred or
if the mouse pointer has moved. TApplication.DispatchEvent calls
HandleMouseDown when the user clicks anywhere within the boundaries of a window. You
usually do not need to call HandleMouseDown yourself.
æKY TWindow.HasPendingUpdate
æD FUNCTION TWindow.HasPendingUpdate: BOOLEAN;
æFi UMacApp.p
æT METHOD
æC HasPendingUpdate returns the value TRUE if the window referenced in fWMgrWindow
has a pending update event. HasPendingUpdate is called by
TTETypingCommand.AddCharacter to update the view before adding new text to it. It is
also called by TTranscriptView.AddText to display the changes in the text record and
the view's size. Another method that calls HasPendingUpdate is TScroller.DoScroll;
this method handles pending update events just before drawing the scrolled view.
Also, HasPendingUpdate is called by TDebugApplication.HandleUpdateEvent to update
the Debug Transcript window. You can use this method in a similar fashion; you
call it to update views that have been changed by your methods or that change
as a result of the actions of other methods.
æKY TWindow.InstallDocument
æD PROCEDURE TWindow.InstallDocument (itsDocument: TDocument);
æFi UMacApp.p
æT METHOD
æC InstallDocument associates the specified document with the window. The
itsDocument parameter is the document associated with the window. If itsDocument is
not NIL, InstallDocument adds the window to the document’s window list; otherwise,
it adds the window to the application’s free window list. InstallDocument is
called by TWindow.IWindow and TWindow.IRes to associate a window with a document
when either of these methods initialize a new TWindow object. You can use
InstallDocument in a similar fashion.
æKY TWindow.IRes
æD PROCEDURE TWindow.IRes(itsDocument: TDocument; itsSuperView: TView;
VAR itsParams: Ptr);
æFi UMacApp.p
æT METHOD
æC IRes initializes a TWindow object from a 'view' resource template. The
itsDocument parameter specifies the document associated with the TWindow object. The
itsSuperView parameter is the TView object into which this view is to be
installed; since a window has no superview, this parameter must be set to NIL. The
itsParams parameter is a pointer to the portion of the 'view' resource data used to
initialize this view. When the IRes method finishes initializing the view, the
method moves the pointer to the end of this data. MacApp calls this method for
each of the views created from a 'view' resource template, usually in response
to a NewTemplateWindow or a DoCreateViews call. You never need to call IRes
yourself.
æKY TWindow.IsDraggable
æD FUNCTION TWindow.IsDraggable(whichRect: Rect): BOOLEAN;
æFi UMacApp.p
æT METHOD
æC IsDraggable returns the value TRUE if any of the corner points of the specified
rectangle are draggable. The whichRect parameter specifies the rectangle to be
tested.
æKY TWindow.IsShown
æD FUNCTION TWindow.IsShown: BOOLEAN; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC IsShown returns the value TRUE if the window is currently shown on the screen.
MacApp uses IsShown to control the execution of methods that manipulate windows.
TWindow.AdaptToScreen uses IsShown to decide if a window should be resized; if
the window is not shown, AdaptToScreen does not resize it. TWindow.Center
controls several of its actions with the value returned by IsShown—for example,
whether to move the window by calling TWindow.Locate. According to the value
returned by IsShown, TWindow.CloseByUser determines whether to count a window in the
open document window list. After TWindow.Focus successfully completes all
other tasks needed to focus the window, the final value it returns is that returned
by a call to IsShown. You can use this method in similar fashion.
æKY TWindow.IWindow
æD PROCEDURE TWindow.IWindow(itsDocument: TDocument; itsWMgrWindow: WindowPtr;
canResize, canClose, disposeOnFree: BOOLEAN);
æFi UMacApp.p
æT METHOD
æC IWindow initializes a window procedurally. It associates the window with a view
and adds the window to either the document’s window list or to the
application’s free window list. If itsDocument is not NIL, IWindow adds the window to
the document’s window list; otherwise, it adds the window to the application’s free
window list. The itsDocument parameter is a reference to the window's document.
The itsWMgrWindow parameter is a pointer to the Window Manager window
associated with the TWindow object. If you want this window to be initialized with a
size box and a zoom box, you can set the value of the canResize parameter to
TRUE. If you want this window to be initialized with a close box, you can set the
value of the canClose parameter to TRUE. If you want the memory occupied by the
window record to be freed when this window is freed, you can set the value of
the disposeOnFree parameter to TRUE. IWindow is called by
TInspectWindow.IInspectWindow to do basic initialization of a TWindow object, which
TInspectWindow.IInspectWindow then customizes. The global routine NewWindow also calls
IWindow to complete its task after doing some basic initialization to the object
NewWindow creates. You can use this method in asimilar fashion.
æKY TWindow.Locate
æD PROCEDURE TWindow.Locate(h, v: VCoordinate; invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Locate moves the window to the horizontal and vertical global coordinates
specified by h and v, and redraws the window if requested. The h and v parameters
specify in local view coordinates the new location of the upper-left corner of the
window. The h parameter is the horizontal coordinate of the upper-left corner
of the window’s new location. The v parameter is the vertical coordinate of the
upper-left corner of the window’s new location. The invalidate parameter is
inherited from TView.Locate, but TWindow.Locate does not use this parameter. If
you override this method, you can use the invalidate parameter to notify
subviews that their superview had moved, to invalidate a view’s focus, to force a view
to be redrawn, or in a function similar to those suggested. TWindow.Center,
TWindow.ForceOnScreen, and TWindow.SimpleStagger use Locate to do the actual work
of moving a window that is shown. TInspectWindow.IInspectWindow and
TInspectWindow.MakeWindow use Locate to initially position the Inspector window in the
upper-right corner of the screen; the global routine InitUDebug uses it similarly
to position the Debug Transcript window. You can use Locate in a similar fashion.
æKY TWindow.MoveByUser
æD PROCEDURE TWindow.MoveByUser (globalMouse: Point);
æFi UMacApp.p
æT METHOD
æC When the user drags in the title bar of the window, MoveByUser draws a gray
outline of the window that follows mouse movements until the mouse button is
released. When the button is released, MoveByUser moves the window to the new
location. If the window is not the active window and the Command key was not pressed,
MoveByUser makes it the active window. If the mouse button is released when the
pointer is outside the limits of the boundary rectangle, MoveByUser does not
move the window or make it the active window. For a document window, the
boundary rectangle is typically 4 pixels in from the menu bar and from the other edges
of the screen, to ensure that there won't be less than a 4-pixel-square area
of the title bar visible on the screen. The globalMouse parameter is the point
at which the user clicked, described in global coordinates. MoveByUser is called
by TApplication.HandleMouseDown or TDebugApplication.HandleMouseDown when the
user drags in a window’s title bar. You usually do not need to call MoveByUser
yourself.
æKY TWindow.Open
æD PROCEDURE TWindow.Open; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Open calls the window’s Resize, AdjustSize, and Show methods to make the window
visible before calling INHERITED Open to inform the window's subviews that they
are now in an active window. If you are creating windows by using templates,
you probably will not need to call Open. If you are creating windows
procedurally, call Open to make the window active. You can override this method for
windows that need extra processing when they are made active, in which case INHERITED
Open is usually called by your override method.
æKY TWindow.Resize
æD PROCEDURE TWindow.Resize(width, height: VCoordinate; invalidate: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Resize changes the window size, invalidates the old and new positions of the
window’s size box (“grow” box), redraws the window if requested, and then calls
INHERITED Resize to resize the window’s subviews. The width parameter is the
window’s new horizontal dimension, expressed in view coordinates. The height
parameter is the window’s new vertical dimension, expressed in view coordinates. If
you set the value of the invalidate parameter to TRUE, the view and its subviews
are invalidated, forcing them to be redrawn in the update process. When you
know the view will be redrawn eventually and wish to avoid drawing it twice—which
makes the screen appear to flash—you can set the invalidate parameter to
FALSE. Many methods call TWindow.Resize to change a window’s size, among them
TWindow.AdaptToScreen, TWindow.ForceOnScreen, TWindow.ResizeByUser, TWindow.Show,
TWindow.Zoom, and the global routines NewPaletteWindow, NewSimpleWindow,
NewTemplateWindow, and InitUDebug. You can use this method in a similar fashion.
æKY TWindow.ResizeByUser
æD PROCEDURE TWindow.ResizeByUser(globalMouse: Point);
æFi UMacApp.p
æT METHOD
æC When the user drags the window's size box, ResizeByUser draws a gray outline of
the window that follows mouse movements until the mouse button is released.
When the button is released, ResizeByUser resizes the window by calling
TWindow.Resize if appropriate. The globalMouse parameter is the point, described in
global coordinates, at which the user first clicked in the window's size box.
ResizeByUser is called by TApplication.HandleMouseDown or TDebugApplication
HandleMouseDown when the user drags a window’s size box. You usually do not need to
call ResizeByUser yourself.
æKY TWindow.Select
æD PROCEDURE TWindow.Select;
æFi UMacApp.p
æT METHOD
æC Select brings the window to the front. Select is called by
TApplication.DoMenuCommand when the user chooses the Show Clipboard menu item. It is
also called by TWindow.HandleMouseDown when the user clicks anywhere in the window and
by TDocument.OpenAgain when the user opens a document that is already open. You can
use Select in a similar fashion; however, you usually will not need to call it
yourself.
æKY TWindow.SetResizeLimits
æD PROCEDURE TWindow.SetResizeLimits(minSize, maxSize: Point);
æFi UMacApp.p
æT METHOD
æC SetResizeLimits sets the minimum and maximum sizes to which the user may resize
the window. The minSize and maxSize parameters determine the minimum size and
the maximum size, respectively, to which the user may resize the window. The
maxSize parameter also determines the window’s size when it is zoomed. The
following methods call SetResizeLimits to set minimum and maximum window sizes: the
global routines InitUDebug and WindCmd, TWindow.IRes, and TWindow.IWindow. You
can use SetResizeLimits in a similar fashion.
æKY TWindow.SetTarget
æD PROCEDURE TWindow.SetTarget (newTarget: TEvtHandler);
æFi UMacApp.p
æT METHOD
æC SetTarget sets the window's target object. If the window is already frontmost,
then SetTarget sets the application’s target also. The newTarget parameter is
the TEvtHandler object that is to be the window's new target object. The
newTarget parameter also specifies the application's target object when appropriate.
MacApp calls SetTarget in several situations requiring that the window or
application's target be set. TWindow.Activate sets both the window and the
application's target. TDialogView.DoSelectEditText sets the window's target to SELF.
TEvtHandler.Free sets the application's target to fNextHandler, if there is one;
otherwise, Free sets the global variable gTarget. TEditText.StartEdit sets the
window to the application's target if the window is frontmost. You can use this
method in a similar fashion.
æKY TWindow.SetTitle
æD PROCEDURE TWindow.SetTitle(newTitle: Str255);
æFi UMacApp.p
æT METHOD
æC This method sets the title of the window pointed at by fWMgrWindow to the given
string. The newTitle parameter is the string that is to be the window's title.
MacApp calls TWindow.SetTitle to set the title of various windows. Methods that
call SetTitle are: TInspector.IInspector, TApplication.OpenNew,
TDocument.SavedOn, TInspectWindow.SetTitleForDoc, TWindow.SetTitleForDoc, and the
global routine InitUDebug. You can use this method to set a window's title also.
æKY TWindow.SetTitleForDoc
æD PROCEDURE TWindow.SetTitleForDoc(newDocTitle: Str255);
æFi UMacApp.p
æT METHOD
æC SetTitleForDoc sets the window’s title to the name of its document. The
newDocTitle parameter is the string that is to be the window's title. SetTitleForDoc
is called by TWindow.InstallDocument and TDocument.SetTitle. You can use
SetTitleForDoc when you want to set a window's title to its document's name.
æKY TWindow.Show
æD PROCEDURE TWindow.Show (state, redraw: BOOLEAN); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC This method shows or hides the window, according to the value of the state
parameter. It also sets the value of the window’s fShown flag to match the value of
the state parameter. The Show method ignores the redraw parameter. If the value
of the state parameter is TRUE, this method shows the window on the screen; if
the value of the state parameter is FALSE, it hides the window. Show is called
by TWindow.Open to show a window, and by TWindow.Close to hide a window. You
can use this method in a similar fashion.
æKY TWindow.SimpleStagger
æD PROCEDURE TWindow.SimpleStagger(dh, dv: INTEGER; VAR counter: INTEGER);
æFi UMacApp.p
æT METHOD
æC SimpleStagger offsets the horizontal and vertical locations of windows to avoid
superimposing them when creating multiple windows on the screen. The dh
parameter is the number of pixels in the horizontal offset. The dv parameter is the
number of pixels in the vertical offset. The counter parameter stores the number
of windows created. SimpleStagger computes the offset for successive windows by
multiplying dh and dv by counter. MacApp calls SimpleStagger from methods that
may be used to create multiple windows. It is called by TWindow.IRes and
TInspector.MakeWindow. You can use SimpleStagger in a similar fashion.
æKY TWindow.Update
æD PROCEDURE TWindow.Update; OVERRIDE;
æFi UMacApp.p
æT METHOD
æC Update handles the update region and calls DrawContents.
TApplication.HandleUpdateEvent calls this method to handle window update events. You
usually do not need to call this method yourself.
æKY TWindow.WRes
æD PROCEDURE TWindow.WRes (theResource: ViewRsrcHndl; VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WRes writes the TWindow portion of the view’s resource template to the location
specified by the itsParams parameter. The parameter theResource is a handle to
the view’s resource template. The parameter itsParams is a pointer to the
TWindow section of the view’s resource template. WRes is the inverse of the IRes
method, and is used only by programs that write 'view' resources; for example,
ViewEdit uses this method to create new 'view' resources from views that are
active on the screen. You rarely need to call this method yourself. You must
override this method in your subclasses to create your own 'view' resources. Your
override should check the size of the space remaining in the template past the end
of the previously-written resource data; if there is not enough space to write
your data into the file, your override should call the global routine
ExpandPtr, passing as arguments the current values of theResource, itsParams, and the
size of your resource data, in bytes. ExpandPtr expands the 'view' resource
handle by the amount you specify, or by kViewRsrcExpandAmt, whichever is greater.
You need not be concerned about making the 'view' resource handle too big,
because MacApp reclaims unused space by returning a new value for itsParams when the
WRes method completes.
æKY TWindow.WriteRes
æD PROCEDURE TWindow.WriteRes (theResource: ViewRsrcHndl;
VAR itsParams: Ptr); OVERRIDE;
æFi UMacApp.p
æT METHOD
æC WriteRes serves as a “wrapper” for WRes; it sets up the signature ('wind') and
class name ('TWindow') for the 'view' resource template, and then calls WRes to
actually write the resource. The parameter theResource is a handle to the
view’s resource template. The parameter itsParams is a pointer to the parameters
MacApp uses to create the new resource. MacApp calls this method to write a
TWindow object as part of a 'view' resource; you can use it in a similar fashion. You
can override this method to provide your own unique class name or signature.
æKY TWindow.Zoom
æD PROCEDURE TWindow.Zoom (partCode: INTEGER);
æFi UMacApp.p
æT METHOD
æC This method zooms a window from its existing size to screen size, or from screen
size back to its previous size. The partCode parameter indicates which way to
zoom. Zoom is called by ZoomByUser when the user clicks the window's zoom box.
You rarely need to call it yourself because MacApp intercepts mouse clicks and
calls this method for you when appropriate.
æKY TWindow.ZoomByUser
æD PROCEDURE TWindow.ZoomByUser(globalMouse: Point; partCode: INTEGER);
æFi UMacApp.p
æT METHOD
æC ZoomByUser calls the Toolbox function TrackBox if the user clicks the window's
zoom box. TrackBox tracks the mouse for as long as the mouse button is pressed,
highlighting the window's zoom box for as long as the pointer is in it. If the
mouse button is released while the pointer is in the zoom box, TrackBox returns
the value TRUE. If TrackBox returns TRUE, ZoomByUser calls Zoom, which zooms
the active window from its existing size to screen size, or from screen size
back to its previous size. The globalMouse parameter is the point, expressed in
global coordinates, where the mouse pointer was pressed. The partCode parameter
contains a constant returned by FindWindow that indicates where the click
occurred and thus which way to zoom. A value of 7 indicates the constant inZoomIn; a
value of 8 indicates the constant inZoomOut. ZoomByUser is called by
TApplication.HandleMouseDown or TDebugApplication.HandleMouseDown when the user clicks a
window's zoom box. You usually will not need to call Zoom yourself because
MacApp intercepts mouse clicks and calls this method for you when appropriate.
æKY Help
MacApp411Help
æKL
%_BP
%_CLASSINFO
%_DISCIPLINEDISPATCH
%_DISCIPLINEDISPATCH_PATCHPOINT
%_EP
%_EX
%_INITOBJ
%_INOBJ
%_JMPTOTRAP
%_METHOD
%_NewMethod
%_OBCHK
%_OBDISP
%_ObjError
%_OBNEW
%_OptInitObj
%_OPTINOBJ
%_OptSetCI
%_PGM1
_addDevHandler
_DataInit
ActionProcForTScrollBar
AddAllRsrc
AddHandle
AddNewObjectsToInspector
AddObjectToInspector
AddSegSizes
AddVPt
AllocateObjectsFromPerm
AllocBlock
ALoadMacAppSeg
APostLoadMacAppSeg
ApplicationBeep
Assertion
AtMAName
AtStr
aVBLTask
AWatchTask
bBoolean
bByte
bChar
bClass
bCmdNumber
bCntlAdornment
bConfigRec
bControlHandle
bDouble
bExtended
bFixed
bFontName
bGrafPtr
bHandle
bHexInteger
bHexLongInt
bHighByte
bHLState
bIDType
bInteger
BlockSet
bLongInt
bLowByte
bObject
bOSType
bPattern
bPoint
bPointer
bReal
bRect
bResType
bRGBColor
bRgnHandle
bScrapStuff
bSingle
bSizeDeterminer
bString
bStringHandle
bStyle
bTEHandle
bTextStyle
bTitle
BuildAllReserves
BuildCodeReserve
BuildMessage
BusyActivate
BusyDelay
BusyInstall
BusyRemove
BusyReset
BusyTurnOff
bVCoordinate
bVHSelect
bVPoint
bVRect
bWindowPtr
bzCantDraw
bzCantUndo
bzClosing
bzDoFirstClick
bzDontDoFirstClick
bzHideClip
bzMakeModal
bzMakeModeless
bzQuitting
bzRedo
bzRevertAnyways
bzSaveAnyways
bzSaveAs
bzSaveCopy
bzSetLeftSysJust
bzSetRightSysJust
bzShowClip
bzUndo
bzUntitled
cAboutApp
CallAlertFilter
CallCapture
CallEnter
CallFileFilter
CallFlagActionProc
CallHelpProc
CallInspector
CallNotify
CallSymActionProc
CallSymbolLookup
CallWDefProc
CanPaste
CanReadLn
CanWriteLn
CatchFailures
cCantUndo
cChangePrinterStyle
cClear
cClose
cCopy
cCut
cDebugPrinting
cDebugWind
cDoFirstClick
cEditBase
cEditLast
cEditSep
cEnterMacAppDebugger
CenterRectOnScreen
cExperimenting
cFinderNew
cFinderOpen
cFinderPrint
chBackspace
chClear
chDown
CheckFreeMasters
CheckReserve
CheckRsrcUsage
chEnd
chEnter
chEscape
chFunction
chFwdDelete
chHelp
chHome
chLeft
chPageDown
chPageUp
Chr00
Chr1F
chReturn
chRight
chSpace
chTab
chUp
cIdentifySoftware
cIntenseDebugging
CleanupMacApp
ClearTheFPU
ClickLoopForTTEView
CloseFile
ClrBreakCmd
CmdEnabled
CmdFromMenuItem
CmdToComponents
CmdToMenuItem
CmdToName
cModalToggle
cMouseCommand
cNew
cNewInspectorWindow
cNewLast
cNoCommand
CompareStrings
ConcatNumber
ConfigRecFields
cOpen
cOpenLast
CopyStr255
cPageSetup
cPaste
cPrFileBase
cPrFileMax
cPrint
cPrintOne
cPrintSpoolFile
cPrintToFile
cPrViewBase
cPrViewMax
cQuit
cReduce50
cReduceToFit
cRefreshFrontWindow
cRememberStyle
cReportEvt
cReportMenuChoices
cRevert
cSave
cSaveAs
cSaveCopy
cSelectAll
cSetSysJust
cShowBorders
cShowBreaks
cShowClipboard
cShowFullSize
cStyleChange
cTraceIdle
cTraceSetupMenus
cTrackingControl
cTyping
cUndo
CurrentCursor
cVarClipPicSize
DebugCanReadLn
DebugCanWriteLn
DebugCapture
DebugEndForce
DebugException
DebugFlag
DebugForceOutput
DebugGetActiveDocument
DebugGetActiveWindow
DebugGetLastCommand
DebugGlobalHandle
DebugPerfMonitor
DebugReadCh
DebugReadLn
DebugRedirect
DebugShowTranscriptWindow
DebugTerminate
DebugTranscriptWidth
DebugWriteLn
DefaultSize
DefineConfiguration
DeleteFile
DevClose
DevFAccess
DevIoctl
DevRead
DevWrite
DisciplineMethodCalls
DisposeIfHandle
DisposeIfPtr
DisposIfHandle
DisposIfPtr
DoChangeReserve
DoFailure
DoInitUMacApp
DoInitUMemory
DoneViewRsrc
DoneWithTempRgn
DoRealInitToolBox
DoShowAboutAppFilter
DoToSubView
DoWaiting
DumpTERecord
DumpTTECommand
EachClassDo
EachFailureHandlerDo
EachFrameDo
EachMenuDo
EachPatchDo
EachSubClassDo
EachSuperClassDo
EachWMgrWindowDo
EmptyVRect
Enable
EnableCheck
EntDebugger
EnterMacAppDebugger
EqualBlocks
EqualVPt
EqualVRect
errAppTable
errFileChanged
errFTypeChanged
errNoPrintDrvr
errNotImplemented
errNotMyType
errOperationsID
ErrorAlert
errReasonID
errRecoveryID
errRevertFNF
errSaveAgain
errSpooling
ExchangeHandles
ExitMacApp
ExpandPtr
ExpandPtrWStr
FailMemError
FailNewMessage
FailNIL
FailNILResource
FailNonObject
FailNoReserve
FailOSErr
FailResError
FailSpaceIsLow
Failure
FieldToString
FileModDate
FillInDirID
FinderSegProc
FindWindowBefore
ForceBusy
FreeIfObject
FreeIfWMgrWindow
FreeListIfObject
FreeObject
FreeWMgrWindow
gAlwaysTrackCursor
gApp1MemList
gApp2MemList
gAppDone
gApplication
gApplicationRefNum
gApplicationStyle
gAskAboutAlloc
gAskFailure
gAssumeFocused
gBoolString
gBreaksPenState
gBusyTempRgn
gCancelAllPrinting
gChooserOK
gClickCount
gClipClaimed
gClipOrphanage
gClipUndoView
gClipView
gClipWindow
gClipWrittenToDeskScrap
gCodeRefNum
gCodeSegs
gConfiguration
gCouldPrint
gCreateWithTemplates
gCurrPrintHandler
gCursorRgn
gDeadStripSuppression
gDebugPrinting
gDefClikLoopProc
gDocList
gDrawingPictScrap
gDrawingPictScrapView
gEnableDoubleBuffering
gErrorParm3
GetA5
GetActualJustification
GetAndLoadWDefProc
GetCallersMethodName
GetClassID
GetClassIDFromName
GetClassNameFromID
GetClassSizeFromId
GetCrsrBusy
GetCurJTOffset
GetCurStackBase
GetCurStackFramePtr
GetCurStackTop
GetDirID
GetErrTxt
GetFileInfo
GetFocus
GetFontNum
GetFrameInfo
GetFreeMastersCount
GetFSFCBLen
GetGZMoveHnd
GetGZRootHnd
GetHandleBits
GetHwCfgFlags
GetIfBkColor
GetIfColor
GetLevel
GetLMMBarHeight
GetMenuColors
GetMenuList
GetMethodName
GetNewCenteredDialog
GetParmBlockPtr
GetPortFontInfo
GetPortTextStyle
GetProcName
GetPromptedChar
GetPromptedNames
GetPromptedNumber
GetPromptedNumberWithDefault
GetPromptedString
GetPromptedStringWithDefault
GetPromptedValue
GetRcvrAtLevel
GetReserveSize
GetResLoad
GetResMenu
GetROMMapInsert
GetSaveVisRgnPtr
GetSegFromPC
GetSegNumber
GetSegResource
GetSegSize
GetSuperClassID
GetSuperClassTableHandle
GetTextStyleFontInfo
GetTheCrsr
GetTrapType
GetUnitNtryCnt
GetUTableBase
GetWindowList
GetWindowVariant
gEventLevel
gExperimenting
gFakeWindow
gFieldToStrRtn
gFileCount
gFinderHPrint
gFinderPrinting
gFocusedView
gFreeWindowList
gGotClipType
gGZPurgeNotify
gHeadCohandler
gIdlePhase
gInBackground
gInFilter
gInhibitNestedHandling
gInitialized
gIntenseDebugging
gIsLoadedSeg
gIsResidentSeg
gJobPrintHandler
gLastClickPart
gLastDeskAcc
gLastMsePt
gLastUpTime
gLongOffset
gLowSpaceInterval
gMacAppAlertFilter
gMainEventMask
gMainFileType
gMastReport
gMATextBoxTE
gMaxLockedRsrc
gMaxStackDepth
gMBarDisplayed
gMBarHeight
gMBarHierarchical
gMBarNotDisplayed
gMemMgtBreak
gMenusAreSetup
gNewScrapStuff
gNextSpaceMsg
gNoChanges
gNullPrintHandler
gNumUntitled
gOldChooserFlag
gOldScrapStuff
gOrthogonal
gPageOffset
gPostCondition
gPreCondition
gPrefClipType
gPrintHandler
gPrinting
gRedrawMenuBar
gReportEvt
gReportInfo
gReportMenuChoices
gReportNext
gReportTime
gRGBBlack
gRGBWhite
GrowZoneProc
gRsrcCheck
gRsrcReport
gSaveFocusRec
gSegReport
gSignatureCount
gSignatureIds
gSignatures
gSingleStep
gStdHysteresis
gStdPageMargins
gStdStaggerCount
gStdWMoveBounds
gStdWScreenRect
gStdWSizeRect
gStrippedAddress
gSysMemList
gSystemStyle
gSysWindowActive
gTarget
gTEDefaultWordBreak
gTempRgn
gToolBoxInitialized
gTopHandler
gTraceIdle
gTraceSetupMenus
gTracing
gUDialogInitialized
gUGridViewInitialized
gUndoCmd
gUndoState
gUnloadAllSegs
gUPrintingInitialized
gUsedBy
gUTEViewInitialized
gVarClipPicSize
gWasTrcEnable
gWorkPort
gWResSignature
gWResType
gZeroPt
gZeroRect
gZeroVPt
gZeroVRect
HandleIsEligible
HandlerExists
HdlInitFailed
Head1Patch
HeadPatch
HeapCmd
hlDim
hlDimOff
hlDimOn
hlOff
hlOffDim
hlOffOn
hlOn
hlOnDim
hlOnOff
IdleProcForTStdPrintHandler
IDUDebug
IDUobject
IDUTranscriptView
InitializationThatMustNotFail
InitMacAppCursor
InitPrinting
InitToolBox
InitUBusyCursor
InitUDebug
InitUDebugAfterIApplication
InitUDialog
InitUGridView
InitUInspector
InitUMacApp
InitUMemory
InitUMenuSetup
InitUObject
InitUPatch
InitUPrinting
InitUTEView
InsetVRect
InspectField
InspectObject
InstallAnNMRequest
InstallDispatcher
InstallGrowZoneProc
InstallIfPrintHandler
InstallInterceptors
InstallWriteLnHook
IntMultiply
InvalidateMenuBar
InvalidateMenus
IsClassIDMemberClass
IsFreeHandle
IsHandle
IsHandleLocked
IsHandlePurged
IsMemberClassID
IsObject
IsUserBreak
JTOffProc
kAdorn
kAEqualB
kAGreaterThanB
kALessThanB
kAllocationIncrement
kAllowApplicationToSleep
kApplFontName
kAskForFilename
kAutoWrap
kBuild
kClearVirtualCode
kCode
kControlOn
kCopyright
kDataOpen
kDebugBuzzStrings
kDebugFont
kDebugParamsID
kDebugSize
kDefaultCredits
kDefaultViewID
kDefaultWindowID
kDeSelect
kDontAdorn
kDontAlign
kDontExtend
kDontFlash
kDontHighlight
kDontInvalidate
kDontRedraw
kEmptyIndex
kEraseFirst
kErrorHandled
kEscapeVirtualCode
kExtend
kF10VirtualCode
kF11VirtualCode
kF12VirtualCode
kF13VirtualCode
kF14VirtualCode
kF15VirtualCode
kF1VirtualCode
kF2VirtualCode
kF3VirtualCode
kF4VirtualCode
kF5VirtualCode
kF6VirtualCode
kF7VirtualCode
kF8VirtualCode
kF9VirtualCode
kFailAbstract
kFailCoercion
kFailMethNotFound
kFailNone
kFixedSize
kFlash
kForceDepth
kForDisplay
kForPrinting
kFrame
kFwdDelVirtualCode
kGZMaxAlloc
kHexDigits
kHighlight
kHMargin
kIDBuzzString
kIDClipView
kIDClipWindow
kIDDefaultView
kIDMNTBbyCmdNumber
kInvalidate
kInvalidObj
kInvalidValue
kInvalidValueReasons
kInvisible
kItem1EqualItem2
kItem1GreaterThanItem2
kItem1LessThanItem2
kItemEqualCriteria
kItemGreaterThanCriteria
kItemLessThanCriteria
kIterateBackward
kIterateForward
kLeftPalette
kLMApFontID
kLMmapFalse
kLMmapTrue
kLMSysFontFam
kLMSysFontSize
kLMTESysJust
kLowSpaceInterval
kMakingCopy
kMANameSize
kMaxCoord
kMaxFlags
kMaxIdleTime
kMaxSignatures
kMaxSyms
kMaxTEWidth
kMBarDisplayed
kMBarHierarchical
kMBarNotDisplayed
kMinAhead
kMNTBbyCmdNumber
kMouseMovedMessage
kMoveBAbsolute
kMoveLAbsolute
kMoveLImmed
kMoveWAbsolute
kNeverInitialized
kNilClass
kNoAutoWrap
kNoButton
kNoEraseFirst
kNoFileRefnum
kNoIdentifier
kNonNumericCharacters
kNoOfDefaultReasons
kNoResource
kNoSpaceForCaret
kNoStaticLink
kNoTemplate
kPreferColor
kPrintDriverName
kPrintInfoSize
kPriorityHigh
kPriorityHighest
kPriorityLow
kPriorityLowest
kPriorityNormal
kRedraw
kRsrcCheckInterval
kRsrcFileOverhead
kRsrcOpen
kRsrcOverhead
kRsrcTypeOverhead
kSaveCurrentChars
kSBarSize
kSBarSizeMinus1
kScrollBarId
kSelect
kShowCantUndo
kShowRedo
kShowUndo
kSpaceForCaret
kSquareDots
kStdButton
kStdCheckBox
kStdCluster
kStdControl
kStdDefaultView
kStdDialogView
kStdDocument
kStdEditText
kStdGridView
kStdIcon
kStdList
kStdMainFileType
kStdNumberText
kStdPattern
kStdPicture
kStdPopup
kStdRadio
kStdScroller
kStdScrollUnit
kStdSScrollBar
kStdStaggerAmount
kStdStaticText
kStdSzMinus1SBar
kStdSzSBar
kStdTEView
kStdTextGridView
kStdTextListView
kStdTracker
kStdView
kStdWindow
kSuspendOrResume
kSwitchToTarget
kSysClear
kSysCopy
kSysCut
kSysFontName
kSysPaste
kSysUndo
kTooManyCharacters
kTopPalette
kUnlimited
kUsesDataFork
kUsesRsrcFork
kUsualPages
kValidValue
kValueTooLarge
kValueTooSmall
kViewRsrcExpandAmt
kVisible
kVMargin
kWantHScrollBar
kWantVScrollBar
kWatchDelay
kWithoutStyle
kWithStyle
kWordAlign
kWWEol
kYesButton
LengthRect
LengthVRect
LIntToHex
LoadMacAppSegment
LoadResidentSegments
LockHandleHigh
LongerSide
LookupErrString
LookupSymbol
LowerChar
LowerStr255
MacAppAlert
MacAppAlertFilter
MACount1Resources
MACountResources
MADebuggerMainEntry
MADrawString
MAGet1IndResource
MAGet1NamedResource
MAGet1Resource
MAGetIndResource
MAGetMenu
MAGetNamedResource
MAGetNewMBar
MAGetResource
MainHelpProc
MAInsertMenu
MAInvalMenuBar
MakeInspector
MakeInspectorWindow
MakeNewInstance
MakeNewRgn
MAOpenFile
mApple
MATextBox
MAUseResFile
Max
maxErr
mButtonHit
mCancelHit
mCancelKey
mCheckBoxHit
mClusterHit
mControlHit
mDebug
mDefaultKey
mEdit
mEditEnterKey
mEditReturnKey
mEditTabKey
mEditTextHit
MemSpaceIsLow
MenuBarHasPendingUpdate
MenusHavePendingUpdate
mFile
mHScrollBarHit
mIconHit
Min
minErr
MinMax
mLastMenu
mListItemHit
mListScrollBarHit
mOKHit
mPatternHit
mPictureHit
mPopupHit
mRadioHit
msgAlert
msgAltRecovery
msgCancelled
msgCmdErr
msgDrawFailed
msgExportClipFailed
msgImportClipFailed
msgInitFailed
msgLookup
msgNewFailed
msgOpenFailed
msgPrintFailed
msgRevertFailed
msgSaveAsFailed
msgSaveCopyFailed
msgSaveFailed
msgStrList
mStaticTextHit
mVScrollBarHit
NeedCalcMenuSize
NewAllocatedList
NewList
NewObjectByClassId
NewObjectByClassName
NewPaletteWindow
NewPermHandle
NewPermPtr
NewSimpleWindow
NewSortedList
NewStdObject
NewTemplateWindow
NewTWindow
NewViewRsrc
NotYetImplemented
NullMenuProc
NumberToHex
NumBlocks
NumToolboxTraps
OBJFail
OffsetPtr
OffsetPtrWStr
OffsetVRect
OptionKeyIsDown
OrderClassIdsByName
ParseTitleTemplate
PatchTrap
pCodeReserve
pCopyright
pCurrTEView
pCursorInfo
pDebugView
pDebugWindow
pDifference
PerfCmd
PerformMenuSetup
PermAllocation
pETSPatch
pFi
phAboutApp
phCmdErr
phFileChanged
phFinderPrintDialog
phGenError
phInvalidValue
phNoPages
phOfferReadOnly
phPurgeOld
phReopenDoc
phRevert
phSaveChanges
phSpaceIsLow
phSpoolPrintDialog
phStylesTooBig
phTooManyChars
phUnimplemented
phUnknownErr
phUnsupportedConfiguration
phWhichDoc
PinOnRect
pInvalidateRgn
PinVRect
pLoadSegCalledFromOwnApp
pMaxSegNum
pMemReserve
pNoOfSegments
PointerToHex
pOKCodeReserve
pOldResFile
PositionDebugWindow
PostLoadMacAppSegment
pPatchList
pPermAllocation
pPixelsToHighlight
pPreviousSelection
PreloadSegment
PreloadSegmentResource
pReserveExists
pReserveShortfall
ProgramBreak
ProgramReport
PRStr
pSegLoadPatch
pSegNeedsUnloading
pSzCodeReserve
pSzMemReserve
Pt2VRect
pTEIntenseDebugging
PtInVRect
PtIsVisible
PtToVPt
PullApplicationToFront
PushLong
PutDeskScrapData
pVisibleCells
qDebug
qDebugTheDebugger
qExperimentalAndUnsupported
qInspector
qMacApp
qNames
qNeedsColorQD
qNeedsFPU
qNeedsHierarchicalMenus
qNeedsMC68020
qNeedsMC68030
qNeedsROM128K
qNeedsScriptManager
qNeedsStyleTextEdit
qNeedsWaitNextEvent
qPerform
qRangeCheck
qTemplateViews
qTrace
ReadInteger
ReadYesNo
RectIsVisible
RectsNest
RectToVRect
RegisterStdType
RemHandle
RemoveAnyNMRequests
RemoveObjectFromInspector
ResetBusyCursor
RoundUp
SaveEventQueue
ScanHandles
ScrapStuffFields
SectVRect
SetBreakCmd
SetCallBack
SetCMacAppCursor
SetCmdIcon
SetCmdName
SetFocus
SetGetProc
SetHandleBits
SetHLPenState
SetIfBkColor
SetIfColor
SetIndCmdName
SetKeyScript
SetMacAppCursor
SetMenuState
SetPermHandleSize
SetPermPtrSize
SetPortTextStyle
SetPutProc
SetReserveSize
SetResidentSegment
SetRGBColor
SetSelect
SetStackSpace
SetStyle
SetTextStyle
SetVPt
SetVRect
ShowDisasmMemory
ShowFields
ShowHeapInfo
ShowHierarchy
ShowLocals
ShowMemory
ShowNames
ShowParameters
ShowRecent
ShowStack
ShowStatus
ShowSymbolWhich
ShowTempSpace
ShowWhere
ShowWhich
StdAlert
StdFieldToString
StdHelpProc
StdNoRect
StripLong
SubstituteInTitle
SubVPt
Success
TAboutAppCommand
TAboutAppCommand.DoIt
TAboutAppCommand.Fields
TAboutAppCommand.IAboutAppCommand
TApplication
TApplication.AbandonUndoClipboard
TApplication.AboutToLoseControl
TApplication.AbsorbScrapStuff
TApplication.ActivateBusyCursor
TApplication.AddDocument
TApplication.AddFreeWindow
TApplication.AlreadyOpen
TApplication.Beep
TApplication.CanOpenDocument
TApplication.CheckDeskScrap
TApplication.ChooseDocument
TApplication.ClaimClipboard
TApplication.Close
TApplication.CloseWmgrWindow
TApplication.CommitLastCommand
TApplication.CountClicks
TApplication.DeleteDocument
TApplication.DeleteFreeWindow
TApplication.DispatchEvent
TApplication.DoCommandKey
TApplication.DoKeyCommand
TApplication.DoMakeDocument
TApplication.DoMenuCommand
TApplication.DoSetupMenus
TApplication.DoShowAboutApp
TApplication.EachFreeWindow
TApplication.fCommandQueue
TApplication.Fields
TApplication.fLastCommand
TApplication.fLaunchWithNewDocument
TApplication.ForAllDocumentsDo
TApplication.ForAllWindowsDo
TApplication.fTicksOfLastIdle
TApplication.fTicksTilNextIdle
TApplication.GetActiveWindow
TApplication.GetDataToPaste
TApplication.GetEvent
TApplication.GetFrontWindow
TApplication.GetInspectorName
TApplication.GetLastCommand
TApplication.GetNextCommand
TApplication.GetRsrcWindow
TApplication.HandleActivateEvent
TApplication.HandleAlienEvent
TApplication.HandleDiskEvent
TApplication.HandleEvent
TApplication.HandleFinderRequest
TApplication.HandleKeyDownEvent
TApplication.HandleMouseDown
TApplication.HandleMouseUp
TApplication.HandleSystemEvent
TApplication.HandleUpdateEvent
TApplication.IApplication
TApplication.IdentifySoftware
TApplication.Idle
TApplication.InModalMenuState
TApplication.InModalState
TApplication.InstallCohandler
TApplication.InvalidateCursorRgn
TApplication.InvalidateFocus
TApplication.IsDeskAccessory
TApplication.KeyEventToComponents
TApplication.KindOfDocument
TApplication.LaunchClipboard
TApplication.MainEventLoop
TApplication.MakeClipboardWindow
TApplication.MakeViewForAlienClipboard
TApplication.MenuEvent
TApplication.OpenDeskAccessory
TApplication.OpenNew
TApplication.OpenOld
TApplication.PerformCommand
TApplication.PollEvent
TApplication.PostCommand
TApplication.PostHandleEvent
TApplication.PrintDocument
TApplication.ReadFromDeskScrap
TApplication.RegainControl
TApplication.ReportEvent
TApplication.Run
TApplication.SelectWMgrWindow
TApplication.SetClipView
TApplication.SetTarget
TApplication.SetUndoText
TApplication.SetupTheMenus
TApplication.SFGetParms
TApplication.ShowError
TApplication.SpaceIsLow
TApplication.SwapClipViews
TApplication.TrackCursor
TApplication.TrackMouse
TApplication.UpdateAllWindows
TApplication.WMgrToWindow
TAssociation
TAssociation.EachEntryDo
TAssociation.EntryWithKey
TAssociation.EntryWithValue
TAssociation.fEntries
TAssociation.Fields
TAssociation.FirstEntryThat
TAssociation.Free
TAssociation.IAssociation
TAssociation.InsertEntry
TAssociation.KeyAt
TAssociation.RemoveKeyAt
TAssociation.RemoveValueAt
TAssociation.ValueAt
TButton
TButton.Fields
TButton.IButton
TButton.IRes
TButton.WRes
TButton.WriteRes
TCellSelectCommand
TCellSelectCommand.ComputeAnchorCell
TCellSelectCommand.ComputeNewSelection
TCellSelectCommand.DoIt
TCellSelectCommand.fAnchorCell
TCellSelectCommand.fCmdKey
TCellSelectCommand.fDeselecting
TCellSelectCommand.fDifference
TCellSelectCommand.fGridView
TCellSelectCommand.Fields
TCellSelectCommand.fPrevCell
TCellSelectCommand.fPrevSelection
TCellSelectCommand.Free
TCellSelectCommand.fShiftKey
TCellSelectCommand.fThisSelection
TCellSelectCommand.HighlightNewSelection
TCellSelectCommand.ICellSelectCommand
TCellSelectCommand.TrackFeedback
TCellSelectCommand.TrackMouse
TCheckBox
TCheckBox.DoChoice
TCheckBox.Fields
TCheckBox.ICheckBox
TCheckBox.IRes
TCheckBox.IsOn
TCheckBox.SetState
TCheckBox.Toggle
TCheckBox.ToggleIf
TCheckBox.WRes
TCheckBox.WriteRes
TClassesByID
TClassesByID.Compare
TClassesByID.Fields
TClassesByID.IClassesByID
TClassesByName
TClassesByName.Compare
TClassesByName.Fields
TClassesByName.IClassesByName
TClassListView
TClassListView.DrawItem
TClassListView.Fields
TClassListView.fInspectWindow
TClassListView.IClassListView
TClassListView.IRes
TClassListView.SelectItem
TCloseWindowCommand
TCloseWindowCommand.DoIt
TCloseWindowCommand.Fields
TCloseWindowCommand.ICloseWindowCommand
TCluster
TCluster.DoChoice
TCluster.Draw
TCluster.fDataHandle
TCluster.Fields
TCluster.fIndex
TCluster.Free
TCluster.fRsrcID
TCluster.GetLabel
TCluster.ICluster
TCluster.IRes
TCluster.ReleaseLabel
TCluster.ReportCurrent
TCluster.SetLabel
TCluster.WRes
TCluster.WriteRes
TColumnSelectCommand
TColumnSelectCommand.ComputeAnchorCell
TColumnSelectCommand.ComputeNewSelection
TColumnSelectCommand.Fields
TColumnSelectCommand.IColumnSelectCommand
TCommand
TCommand.AutoScroll
TCommand.Commit
TCommand.DoIt
TCommand.fCanUndo
TCommand.fCausesChange
TCommand.fChangedDocument
TCommand.fChangesClipboard
TCommand.fCmdDone
TCommand.fCmdNumber
TCommand.fConstrainsMouse
TCommand.fFreeOnCompletion
TCommand.Fields
TCommand.fInitialPt
TCommand.fPriority
TCommand.fReadyToExecute
TCommand.fRecurring
TCommand.fScroller
TCommand.fTrackNonMovement
TCommand.fTracksMouse
TCommand.fView
TCommand.fViewConstrain
TCommand.ICommand
TCommand.IsDoneTracking
TCommand.IsReadyToExecute
TCommand.RedoIt
TCommand.TrackConstrain
TCommand.TrackFeedback
TCommand.TrackMouse
TCommand.UndoIt
TCommandList
TCommandList.Compare
TCommandList.Fields
TCommandList.ICommandList
TCommandList.Insert
TControl
TControl.ComputeSize
TControl.ContainsMouse
TControl.ControlArea
TControl.Dim
TControl.DimState
TControl.DoMouseCommand
TControl.Draw
TControl.fAdornment
TControl.fDefChoice
TControl.fDimmed
TControl.fDismissesDialog
TControl.fHilite
TControl.Fields
TControl.fInset
TControl.Flash
TControl.Focus
TControl.fPenSize
TControl.fSizeable
TControl.fTextStyle
TControl.Hilite
TControl.HiliteState
TControl.IControl
TControl.Inset
TControl.InstallColor
TControl.InstallTextStyle
TControl.IRes
TControl.IsDimmed
TControl.Resize
TControl.SetInset
TControl.TrackFeedback
TControl.TrackMouse
TControl.Validate
TControl.WRes
TControl.WriteRes
TControlTracker
TControlTracker.fControl
TControlTracker.Fields
TControlTracker.IControlTracker
TCtlMgr
TCtlMgr.BeInPort
TCtlMgr.CreateCMgrControl
TCtlMgr.DimState
TCtlMgr.DoMouseCommand
TCtlMgr.Draw
TCtlMgr.fBitsToShift
TCtlMgr.fCMgrControl
TCtlMgr.Fields
TCtlMgr.fLongMax
TCtlMgr.fLongMin
TCtlMgr.fLongVal
TCtlMgr.Free
TCtlMgr.GetLongMax
TCtlMgr.GetLongMin
TCtlMgr.GetLongVal
TCtlMgr.GetMax
TCtlMgr.GetMin
TCtlMgr.GetText
TCtlMgr.GetVal
TCtlMgr.HiliteState
TCtlMgr.ICtlMgr
TCtlMgr.IRes
TCtlMgr.IsCMgrVisible
TCtlMgr.Resize
TCtlMgr.SetCMgrVisibility
TCtlMgr.SetLongMax
TCtlMgr.SetLongMin
TCtlMgr.SetLongVal
TCtlMgr.SetLongValues
TCtlMgr.SetMax
TCtlMgr.SetMin
TCtlMgr.SetText
TCtlMgr.SetVal
TCtlMgr.SetValues
TCtlMgr.WhileFocused
TCtlMgr.WriteRes
TDebugApplication
TDebugApplication.DoMenuCommand
TDebugApplication.HandleAlienEvent
TDebugApplication.HandleEvent
TDebugApplication.HandleKeyDownEvent
TDebugApplication.HandleMouseDown
TDebugApplication.HandleSystemEvent
TDebugApplication.HandleUpdateEvent
TDebugApplication.IDebugApplication
TDebugApplication.MenuEvent
TDebugApplication.PollEvent
TDebugApplication.PostHandleEvent
TDebugApplication.WMgrToWindow
TDebugCommand
TDebugCommand.DoIt
TDebugCommand.Fields
TDebugCommand.IDebugCommand
TDeskScrapView
TDeskScrapView.CalcMinSize
TDeskScrapView.CheckScrapContents
TDeskScrapView.Draw
TDeskScrapView.fDataHandle
TDeskScrapView.fHavePicture
TDeskScrapView.fHaveText
TDeskScrapView.Fields
TDeskScrapView.Free
TDeskScrapView.fScrapCount
TDeskScrapView.GetInspectorName
TDeskScrapView.IDeskScrapView
TDeskScrapView.IRes
TDeskScrapView.SuperViewChangedSize
TDeskScrapView.WriteToDeskScrap
TDialogTEView
TDialogTEView.ComputeSize
TDialogTEView.fEditText
TDialogTEView.Fields
TDialogTEView.Free
TDialogTEView.fScroller
TDialogTEView.IDialogTEView
TDialogTEView.InstallEditText
TDialogTEView.InstallSelection
TDialogTEView.IRes
TDialogView
TDialogView.CanDismiss
TDialogView.CantDeselect
TDialogView.Close
TDialogView.DeselectCurrentEditText
TDialogView.DismissDialog
TDialogView.DoChoice
TDialogView.DoCommandKey
TDialogView.DoKeyCommand
TDialogView.DoOpen
TDialogView.DoSelectEditText
TDialogView.EachEditText
TDialogView.fCancelItem
TDialogView.fCurrentEditText
TDialogView.fDefaultItem
TDialogView.fDismissed
TDialogView.fDismisser
TDialogView.Fields
TDialogView.fParamTxt
TDialogView.Free
TDialogView.fTEView
TDialogView.GetDialogView
TDialogView.IDialogView
TDialogView.IRes
TDialogView.MakeTEView
TDialogView.Open
TDialogView.ParamTxt
TDialogView.PoseModally
TDialogView.ReplaceText
TDialogView.SelectEditText
TDialogView.SurveyEditText
TDialogView.Tab
TDialogView.WRes
TDialogView.WriteRes
TDocument
TDocument.Abandon
TDocument.AboutToSave
TDocument.AddView
TDocument.AddWindow
TDocument.CheckDiskFile
TDocument.Close
TDocument.CloseView
TDocument.DeleteView
TDocument.DeleteWindow
TDocument.DiskFileChanged
TDocument.DoInitialState
TDocument.DoMakeViews
TDocument.DoMakeWindows
TDocument.DoMenuCommand
TDocument.DoNeedDiskSpace
TDocument.DoRead
TDocument.DoSetupMenus
TDocument.DoWrite
TDocument.fChangeCount
TDocument.fCommitOnSave
TDocument.fCreator
TDocument.fDataOpen
TDocument.fDataPerm
TDocument.fDataRefNum
TDocument.fDocPrintHandler
TDocument.fFileType
TDocument.Fields
TDocument.fModDate
TDocument.ForAllViewsDo
TDocument.ForAllWindowsDo
TDocument.fPrintInfo
TDocument.Free
TDocument.FreeData
TDocument.FreeFile
TDocument.FreeFromClipboard
TDocument.fReopenAlert
TDocument.fRsrcOpen
TDocument.fRsrcPerm
TDocument.fRsrcRefNum
TDocument.fSaveExists
TDocument.fSaveInPlace
TDocument.fSavePrintInfo
TDocument.fSharePrintInfo
TDocument.fTitle
TDocument.fUsesDataFork
TDocument.fUsesRsrcFork
TDocument.fViewList
TDocument.fVolRefNum
TDocument.fWindowList
TDocument.GetChangeCount
TDocument.GetInspectorName
TDocument.GetSaveInfo
TDocument.GetTempName
TDocument.HandlesPrintingCommands
TDocument.IDocument
TDocument.MakeNewCopy
TDocument.OpenAFile
TDocument.OpenAgain
TDocument.PoseSaveDialog
TDocument.ReadFromFile
TDocument.RequestFileName
TDocument.Revert
TDocument.Save
TDocument.SaveAgain
TDocument.SavedOn
TDocument.SaveInPlace
TDocument.SaveViaTemp
TDocument.SetChangeCount
TDocument.SetTitle
TDocument.SFPutParms
TDocument.ShowReverted
TDocument.ShowWindows
TDocument.UntitledName
TDynamicArray
TDynamicArray.ComputeAddress
TDynamicArray.DeleteElementsAt
TDynamicArray.DynamicFields
TDynamicArray.EachElementDoTil
TDynamicArray.fAllocatedSize
TDynamicArray.fAllocationIncrement
TDynamicArray.fClassSize
TDynamicArray.fElementSize
TDynamicArray.fElementSizeShift
TDynamicArray.fFreeRequested
TDynamicArray.Fields
TDynamicArray.Free
TDynamicArray.fSize
TDynamicArray.GetElementsAt
TDynamicArray.GetSize
TDynamicArray.IDynamicArray
TDynamicArray.InsertElementsBefore
TDynamicArray.IsEmpty
TDynamicArray.Merge
TDynamicArray.ReplaceElementsAt
TDynamicArray.SetArraySize
TEditText
TEditText.ChangeWrap
TEditText.DoSubstitution
TEditText.Draw
TEditText.fControlChars
TEditText.Fields
TEditText.fMaxChars
TEditText.Free
TEditText.fTEView
TEditText.GetText
TEditText.HandleMouseDown
TEditText.IEditText
TEditText.ImageText
TEditText.InstallSelection
TEditText.IRes
TEditText.RestartEdit
TEditText.SetJustification
TEditText.SetSelection
TEditText.SetText
TEditText.StartEdit
TEditText.StopEdit
TEditText.Validate
TEditText.WRes
TEditText.WriteRes
teJustSystem
TEntriesList
TEntriesList.Compare
TEntriesList.Fields
TEntriesList.IEntriesList
TEntry
TEntry.Fields
TEntry.fKey
TEntry.Free
TEntry.fValue
TEntry.IEntry
TEntry.SetValue
TestRecoverHandle
TEvtHandler
TEvtHandler.AddHandler
TEvtHandler.CommitLastCommand
TEvtHandler.CreateAView
TEvtHandler.DoChoice
TEvtHandler.DoCommandKey
TEvtHandler.DoCreateViews
TEvtHandler.DoHandleEvent
TEvtHandler.DoHelp
TEvtHandler.DoIdle
TEvtHandler.DoKeyCommand
TEvtHandler.DoMenuCommand
TEvtHandler.DoMultiClick
TEvtHandler.DoSetupMenus
TEvtHandler.EachHandler
TEvtHandler.fIdleFreq
TEvtHandler.Fields
TEvtHandler.FirstHandlerThat
TEvtHandler.fLastIdle
TEvtHandler.fNextHandler
TEvtHandler.Free
TEvtHandler.GetLastCommand
TEvtHandler.GetNextCommand
TEvtHandler.HandlesPrintingCommands
TEvtHandler.IdentifySoftware
TEvtHandler.IEvtHandler
TEvtHandler.InstallSelection
TEvtHandler.KeyEventToComponents
TEvtHandler.LookupSymbol
TEvtHandler.PerformCommand
TEvtHandler.PostCommand
TEvtHandler.RemoveHandler
TEvtHandler.SetIdleFreq
TEvtHandler.Terminate
TextStyleFields
TGridView
TGridView.AdornCol
TGridView.AdornRow
TGridView.AllCellsDo
TGridView.CalcMinSize
TGridView.CanSelectCell
TGridView.CellsToPixels
TGridView.CellToVRect
TGridView.ColToVRect
TGridView.DelColAt
TGridView.DelColFirst
TGridView.DelColLast
TGridView.DelRowAt
TGridView.DelRowFirst
TGridView.DelRowLast
TGridView.DoHighlightSelection
TGridView.DoMouseCommand
TGridView.Draw
TGridView.DrawCell
TGridView.DrawRangeOfCells
TGridView.EachCellDo
TGridView.EachInRgn
TGridView.EachSelectedCellDo
TGridView.fAdornCols
TGridView.fAdornRows
TGridView.fColInset
TGridView.fColWidths
TGridView.fHLRegion
TGridView.Fields
TGridView.FirstSelectedCell
TGridView.fNumOfCols
TGridView.fNumOfRows
TGridView.Free
TGridView.fRowHeights
TGridView.fRowInset
TGridView.fSelections
TGridView.fSingleSelection
TGridView.fTempSelections
TGridView.GetColWidth
TGridView.GetRowHeight
TGridView.HighlightCells
TGridView.IdentifyPoint
TGridView.IGridView
TGridView.InsColBefore
TGridView.InsColFirst
TGridView.InsColLast
TGridView.InsRowBefore
TGridView.InsRowFirst
TGridView.InsRowLast
TGridView.InvalidateCell
TGridView.InvalidateSelection
TGridView.IRes
TGridView.IsCellSelected
TGridView.LastSelectedCell
TGridView.RowToVRect
TGridView.ScrollSelectionIntoView
TGridView.SelectCell
TGridView.SetColWidth
TGridView.SetEmptySelection
TGridView.SetRowHeight
TGridView.SetSelection
TGridView.SetSelectionRect
TGridView.SetSingleSelection
TGridView.VPointToCell
TGridView.VPointToLastCell
TGridView.WRes
TGridView.WriteRes
TIcon
TIcon.Draw
TIcon.fDataHandle
TIcon.Fields
TIcon.fPreferColor
TIcon.Free
TIcon.fRsrcID
TIcon.IIcon
TIcon.IRes
TIcon.ReleaseIcon
TIcon.SetIcon
TIcon.WRes
TIcon.WriteRes
TInspector
TInspector.AddObject
TInspector.AddObjectList
TInspector.DoSetupMenus
TInspector.fClassesByID
TInspector.fClassesByName
TInspector.Fields
TInspector.Free
TInspector.fStaggerCount
TInspector.fWindowCount
TInspector.GetObjectList
TInspector.IInspector
TInspector.MakeWindow
TInspector.RemoveObject
TInspectorCommand
TInspectorCommand.DoIt
TInspectorCommand.Fields
TInspectorCommand.IInspectorCommand
TInspectWindow
TInspectWindow.CloseByUser
TInspectWindow.Draw
TInspectWindow.fClassListView
TInspectWindow.Fields
TInspectWindow.fObjectView
TInspectWindow.fObjListView
TInspectWindow.IInspectWindow
TInspectWindow.InsertClass
TInspectWindow.IRes
TInspectWindow.Resize
TInspectWindow.SelectObject
TInspectWindow.SetNumberOfClasses
TInspectWindow.SetTitleForDoc
TList
TList.At
TList.AtDelete
TList.AtPut
TList.Delete
TList.DeleteAll
TList.DynamicFields
TList.Each
TList.Fields
TList.First
TList.FirstThat
TList.fObjClassID
TList.FreeAll
TList.FreeList
TList.GetEqualItemNo
TList.GetInspectorName
TList.GetSameItemNo
TList.IList
TList.Insert
TList.InsertBefore
TList.InsertFirst
TList.InsertLast
TList.IterateTil
TList.Last
TList.LastThat
TList.Pop
TList.Push
TList.SetEltType
TList.SetEltTypeID
TList.SortBy
TListView
TListView.CalcMinSize
TListView.ChangeSelection
TListView.DeleteItem
TListView.DoHighlightSelection
TListView.DoMouseCommand
TListView.Draw
TListView.DrawItem
TListView.fCurrentSelection
TListView.Fields
TListView.fItemHeight
TListView.fLineAscent
TListView.fNumberOfItems
TListView.fTextStyle
TListView.IListView
TListView.InsertItem
TListView.IRes
TListView.ItemToVRect
TListView.RevealItem
TListView.SelectItem
TListView.SetNumberOfItems
TListView.SetPen
TListView.SetStyle
TListView.VPointToItem
TNewDocCommand
TNewDocCommand.DoIt
TNewDocCommand.Fields
TNewDocCommand.INewDocCommand
TNoChangesCommand
TNoChangesCommand.Fields
TNoChangesCommand.INoChangesCommand
TNumberText
TNumberText.Fields
TNumberText.fMaximum
TNumberText.fMinimum
TNumberText.GetValue
TNumberText.INumberText
TNumberText.IRes
TNumberText.SetValue
TNumberText.Validate
TNumberText.WRes
TNumberText.WriteRes
TObject
TObject.Clone
TObject.DynamicFields
TObject.Fields
TObject.ForAllSubClassesDo
TObject.ForAllSuperClassesDo
TObject.Free
TObject.GetClass
TObject.GetClassName
TObject.GetClassSize
TObject.GetDynamicPtr
TObject.GetDynamicSize
TObject.GetInspectorName
TObject.GetInstanceSize
TObject.GetSuperClass
TObject.Initialize
TObject.Inspect
TObject.IObject
TObject.IsMemberClass
TObject.IsSameClass
TObject.Lock
TObject.SetDynamicSize
TObject.SetInstanceSize
TObject.ShallowClone
TObject.ShallowFree
TObjectList
TObjectList.AddObject
TObjectList.Fields
TObjectList.IObjectList
TObjectList.RemoveObject
TObjectView
TObjectView.ChangeSelection
TObjectView.DoMouseCommand
TObjectView.Draw
TObjectView.Fields
TObjectView.fInspectWindow
TObjectView.FirstFieldThat
TObjectView.fLockState
TObjectView.fObject
TObjectView.fType
TObjectView.InspectControlHandle
TObjectView.InspectGrafPtr
TObjectView.InspectHandle
TObjectView.InspectRgnHandle
TObjectView.InspectTEHandle
TObjectView.InspectWindowPtr
TObjectView.InstallObject
TObjectView.IObjectView
TObjectView.IRes
TObjectView.LockObject
TObjectView.Resize
TObjectView.SelectField
TObjectView.SuperViewChangedSize
TObjectView.UnlockObject
TObjListView
TObjListView.DrawItem
TObjListView.Fields
TObjListView.fInspectWindow
TObjListView.fObjectList
TObjListView.InstallObjectList
TObjListView.IObjListView
TObjListView.IRes
TObjListView.SelectItem
ToggleCmd
TOldDocCommand
TOldDocCommand.DoIt
TOldDocCommand.Fields
TOldDocCommand.IOldDocCommand
TotalTempSize
TPattern
TPattern.Draw
TPattern.fDataHandle
TPattern.Fields
TPattern.fPreferColor
TPattern.Free
TPattern.fRsrcID
TPattern.IPattern
TPattern.IRes
TPattern.ReleasePattern
TPattern.SetPattern
TPattern.WRes
TPattern.WriteRes
TPicture
TPicture.Draw
TPicture.fDataHandle
TPicture.Fields
TPicture.Free
TPicture.fRsrcID
TPicture.IPicture
TPicture.IRes
TPicture.ReleasePicture
TPicture.SetPicture
TPicture.WRes
TPicture.WriteRes
TPopup
TPopup.AdjustBotRight
TPopup.CalcLabelRect
TPopup.CalcMenuRect
TPopup.DoMouseCommand
TPopup.Draw
TPopup.DrawLabel
TPopup.DrawPopupBox
TPopup.fCurrentItem
TPopup.Fields
TPopup.fItemOffset
TPopup.fMenuHandle
TPopup.fMenuID
TPopup.Free
TPopup.fRsrcID
TPopup.GetCurrentItem
TPopup.GetItemText
TPopup.IPopup
TPopup.IRes
TPopup.ReleasePopup
TPopup.SetCurrentItem
TPopup.SetPopup
TPopup.WRes
TPopup.WriteRes
TPrintCommand
TPrintCommand.DoIt
TPrintCommand.Fields
TPrintCommand.fStdPrintHandler
TPrintCommand.IPrintCommand
TPrintHandler
TPrintHandler.BreakFollowing
TPrintHandler.CalcPageStrips
TPrintHandler.CalcViewPerPage
TPrintHandler.CheckPrinter
TPrintHandler.DrawPageBreak
TPrintHandler.DrawPrintFeedback
TPrintHandler.fDeviceRes
TPrintHandler.fDocument
TPrintHandler.fFocusedPage
TPrintHandler.Fields
TPrintHandler.FocusOnInterior
TPrintHandler.fView
TPrintHandler.fViewPerPage
TPrintHandler.GetInspectorName
TPrintHandler.IPrintHandler
TPrintHandler.LocatePageInterior
TPrintHandler.MaxPageNumber
TPrintHandler.Print
TPrintHandler.PrinterChanged
TPrintHandler.RedoPageBreaks
TPrintHandler.Reset
TPrintHandler.SetDefaultPrintInfo
TPrintHandler.SetPageInterior
TPrintHandler.SetPageOffset
TPrintHandler.SetupForFinder
TPrintStyleChangeCommand
TPrintStyleChangeCommand.DoIt
TPrintStyleChangeCommand.Fields
TPrintStyleChangeCommand.fNewHPrint
TPrintStyleChangeCommand.fOldHPrint
TPrintStyleChangeCommand.Free
TPrintStyleChangeCommand.fStdPrintHandler
TPrintStyleChangeCommand.IPrintStyleChangeCommand
TPrintStyleChangeCommand.RedoIt
TPrintStyleChangeCommand.UndoIt
TPtrBasedDoublyLinkedList
TPtrBasedDoublyLinkedList.AppendNode
TPtrBasedDoublyLinkedList.EachNodeDo
TPtrBasedDoublyLinkedList.fHeadNodePtr
TPtrBasedDoublyLinkedList.Fields
TPtrBasedDoublyLinkedList.fTailNodePtr
TPtrBasedDoublyLinkedList.IPtrBasedDoublyLinkedList
TPtrBasedDoublyLinkedList.RemoveNode
TQuitCommand
TQuitCommand.DoIt
TQuitCommand.Fields
TQuitCommand.IQuitCommand
TraceMenuName
TRadio
TRadio.DoChoice
TRadio.Fields
TRadio.IRadio
TRadio.IRes
TRadio.IsOn
TRadio.SetState
TRadio.Toggle
TRadio.ToggleIf
TRadio.WRes
TRadio.WriteRes
TrapExists
TrcEnable
TRCSelectCommand
TRCSelectCommand.ComputeNewSelection
TRCSelectCommand.Fields
TRCSelectCommand.TrackMouse
TRevertDocCommand
TRevertDocCommand.DoIt
TRevertDocCommand.Fields
TRevertDocCommand.IRevertDocCommand
TRowSelectCommand
TRowSelectCommand.ComputeAnchorCell
TRowSelectCommand.ComputeNewSelection
TRowSelectCommand.Fields
TRowSelectCommand.IRowSelectCommand
TRunArray
TRunArray.DeleteItems
TRunArray.fChunks
TRunArray.Fields
TRunArray.FindChunk
TRunArray.FindItem
TRunArray.fLastChunk
TRunArray.fLastIndex
TRunArray.fLastItem
TRunArray.fLastTotal
TRunArray.fNoOfChunks
TRunArray.fNoOfItems
TRunArray.Free
TRunArray.fTotal
TRunArray.GetValue
TRunArray.InsertItems
TRunArray.IRunArray
TRunArray.SumValues
TSaveDocCommand
TSaveDocCommand.DoIt
TSaveDocCommand.Fields
TSaveDocCommand.ISaveDocCommand
TScrollBar
TScrollBar.ActionProc
TScrollBar.DeltaValue
TScrollBar.DoMouseCommand
TScrollBar.fBitsToShift
TScrollBar.fDirection
TScrollBar.Fields
TScrollBar.fLongMax
TScrollBar.fLongMin
TScrollBar.fLongVal
TScrollBar.IRes
TScrollBar.IScrollBar
TScrollBar.TrackScrollBar
TScrollBar.WRes
TScrollBar.WriteRes
TScroller
TScroller.AddSubview
TScroller.AdjustScrollBars
TScroller.AutoScroll
TScroller.CreateScrollBar
TScroller.CreateTemplateScrollBar
TScroller.DoKeyCommand
TScroller.DoScroll
TScroller.fConstrain
TScroller.Fields
TScroller.fMaxTranslation
TScroller.Focus
TScroller.ForceRedraw
TScroller.Free
TScroller.fRespondsToFunctionKeys
TScroller.fSBarOffsets
TScroller.fScrollBars
TScroller.fScrollLimit
TScroller.fScrollUnit
TScroller.fTranslation
TScroller.GetExtent
TScroller.GetScroller
TScroller.HaveScrollBar
TScroller.IRes
TScroller.IScroller
TScroller.LocalToSuper
TScroller.Locate
TScroller.RemoveSubview
TScroller.Resize
TScroller.RevealRect
TScroller.ScrollBy
TScroller.ScrollDraw
TScroller.ScrollRelative
TScroller.ScrollStep
TScroller.ScrollTo
TScroller.SetScrollLimits
TScroller.SetScrollParameters
TScroller.SubViewChangedSize
TScroller.SuperToLocal
TScroller.WRes
TScroller.WriteRes
TSortedList
TSortedList.Compare
TSortedList.DoSearch
TSortedList.Fields
TSortedList.GetEqualItemNo
TSortedList.Insert
TSortedList.ISortedList
TSortedList.Search
TSortedList.Sort
TSScrollBar
TSScrollBar.Activate
TSScrollBar.AttachScroller
TSScrollBar.BeInPort
TSScrollBar.DoMouseCommand
TSScrollBar.Draw
TSScrollBar.Fields
TSScrollBar.Free
TSScrollBar.fScrollers
TSScrollBar.IRes
TSScrollBar.ISScrollBar
TSScrollBar.TrackScrollBar
TSScrollBar.WriteRes
TStaticText
TStaticText.ChangeWrap
TStaticText.DoSubstitution
TStaticText.Draw
TStaticText.fAutoWrap
TStaticText.fDataHandle
TStaticText.Fields
TStaticText.fIndex
TStaticText.fJust
TStaticText.Free
TStaticText.fRsrcID
TStaticText.GetText
TStaticText.ImageText
TStaticText.IRes
TStaticText.IStaticText
TStaticText.ReleaseText
TStaticText.SetJustification
TStaticText.SetText
TStaticText.WRes
TStaticText.WriteRes
TStdPrintHandler
TStdPrintHandler.AdornPage
TStdPrintHandler.BanishPrintDialog
TStdPrintHandler.BreakFollowing
TStdPrintHandler.CalcPageStrips
TStdPrintHandler.CalcViewPerPage
TStdPrintHandler.CheckPrinter
TStdPrintHandler.ChkPrintErr
TStdPrintHandler.ChooseSpoolFile
TStdPrintHandler.ClosePrintShop
TStdPrintHandler.DoInMacPrint
TStdPrintHandler.DoMenuCommand
TStdPrintHandler.DoPrintIdling
TStdPrintHandler.DoSetupMenus
TStdPrintHandler.DrawPageBreak
TStdPrintHandler.DrawPageInterior
TStdPrintHandler.DrawPrintFeedback
TStdPrintHandler.EachBreak
TStdPrintHandler.fFinderJobDialog
TStdPrintHandler.fFinderSetup
TStdPrintHandler.fFixedSizePages
TStdPrintHandler.fHPrint
TStdPrintHandler.Fields
TStdPrintHandler.fLastBreak
TStdPrintHandler.fLastCheckedPrinter
TStdPrintHandler.fLastPrinterName
TStdPrintHandler.fLastStrip
TStdPrintHandler.fMarginRes
TStdPrintHandler.fMinimalMargins
TStdPrintHandler.FocusOnBorder
TStdPrintHandler.FocusOnInterior
TStdPrintHandler.fPageAreas
TStdPrintHandler.fPageDirection
TStdPrintHandler.fPageStrips
TStdPrintHandler.fPPrPort
TStdPrintHandler.fPrintDialog
TStdPrintHandler.fPrinterDev
TStdPrintHandler.fPrintExtent
TStdPrintHandler.Free
TStdPrintHandler.fShowBreaks
TStdPrintHandler.fSquareDots
TStdPrintHandler.fStartPage
TStdPrintHandler.fViewedRect
TStdPrintHandler.GetBreakCoord
TStdPrintHandler.GetDocName
TStdPrintHandler.GetDriverName
TStdPrintHandler.IdentifySoftware
TStdPrintHandler.InstallMargins
TStdPrintHandler.InvalPageFeedback
TStdPrintHandler.IStdPrintHandler
TStdPrintHandler.LocatePageInterior
TStdPrintHandler.MaxPageNumber
TStdPrintHandler.OneSubJob
TStdPrintHandler.OpenPrintShop
TStdPrintHandler.PageToStrip
TStdPrintHandler.PointToPageStrip
TStdPrintHandler.PoseJobDialog
TStdPrintHandler.PosePageSetupDialog
TStdPrintHandler.PosePrintDialog
TStdPrintHandler.Print
TStdPrintHandler.PrinterChanged
TStdPrintHandler.PrintPage
TStdPrintHandler.PrintSpoolFile
TStdPrintHandler.RedoPageBreaks
TStdPrintHandler.Reset
TStdPrintHandler.SetDefaultPrintInfo
TStdPrintHandler.SetMargins
TStdPrintHandler.SetPage
TStdPrintHandler.SetPageInterior
TStdPrintHandler.SetPageOffset
TStdPrintHandler.SetPrintExtent
TStdPrintHandler.SetupForFinder
TStdPrintHandler.SetupPrintOne
TStdPrintHandler.ShowDocBeingPrinted
TStdPrintHandler.ShowsOnScreen
TStdPrintHandler.StripToPage
TStdPrintHandler.ValidatePrintRecord
TTECommand
TTECommand.BanishOldText
TTECommand.DoIt
TTECommand.DoMainFunction
TTECommand.fHTE
TTECommand.Fields
TTECommand.fNewEnd
TTECommand.fNewStart
TTECommand.fNewStyles
TTECommand.fNewText
TTECommand.fOldEnd
TTECommand.fOldStart
TTECommand.fOldStyles
TTECommand.fOldText
TTECommand.fPadding
TTECommand.Free
TTECommand.fStylePad
TTECommand.fTEView
TTECommand.fTextPad
TTECommand.InstallNewText
TTECommand.ITECommand
TTECommand.RedoIt
TTECommand.RemoveAdditions
TTECommand.RestoreSelection
TTECommand.ReviveDeletions
TTECommand.UndoIt
TTECutCopyCommand
TTECutCopyCommand.DoIt
TTECutCopyCommand.fClipCreated
TTECutCopyCommand.Fields
TTECutCopyCommand.Free
TTECutCopyCommand.ITECutCopyCommand
TTECutCopyCommand.ReviveDeletions
TTEPasteCommand
TTEPasteCommand.Fields
TTEPasteCommand.ITEPasteCommand
TTEStyleCommand
TTEStyleCommand.DoIt
TTEStyleCommand.Fields
TTEStyleCommand.fMode
TTEStyleCommand.fNewTextStyle
TTEStyleCommand.fOldTextStyle
TTEStyleCommand.InstallManyStyles
TTEStyleCommand.InstallOneStyle
TTEStyleCommand.ITEStyleCommand
TTEStyleCommand.RedoIt
TTEStyleCommand.UndoIt
TTETypingCommand
TTETypingCommand.AddCharacter
TTETypingCommand.BkSpcLeft
TTETypingCommand.BkSpcRight
TTETypingCommand.CompleteTyping
TTETypingCommand.DoIt
TTETypingCommand.DoNormalChar
TTETypingCommand.fCompleted
TTETypingCommand.fFirstChar
TTETypingCommand.Fields
TTETypingCommand.Free
TTETypingCommand.FwdDelete
TTETypingCommand.ITETypingCommand
TTETypingCommand.RedoIt
TTETypingCommand.UndoIt
TTEView
TTEView.AutoScrolling
TTEView.BeInPort
TTEView.BeInScroller
TTEView.CalcMinSize
TTEView.CalcRealHeight
TTEView.CalcRealWidth
TTEView.CalcSelLoc
TTEView.ChangeWrap
TTEView.ClikLoop
TTEView.ComputeSize
TTEView.ContainsClipType
TTEView.ContinuousStyle
TTEView.DoBreakFollowing
TTEView.DoCalcViewPerPage
TTEView.DoIdle
TTEView.DoKeyCommand
TTEView.DoMakeEditCommand
TTEView.DoMakeStyleCommand
TTEView.DoMakeTypingCommand
TTEView.DoMenuCommand
TTEView.DoMouseCommand
TTEView.DoneTyping
TTEView.DoSetCursor
TTEView.DoSetPageOffset
TTEView.DoSetupMenus
TTEView.Draw
TTEView.ExtractStyles
TTEView.ExtractText
TTEView.fAcceptsChanges
TTEView.fAutoWrap
TTEView.fControlChars
TTEView.fFreeText
TTEView.fHTE
TTEView.Fields
TTEView.fInset
TTEView.fJustification
TTEView.fKeyCmdNumber
TTEView.fLastHeight
TTEView.fLastLine
TTEView.fLastPageBreak
TTEView.fLastWidth
TTEView.fMaxChars
TTEView.fMinAhead
TTEView.Free
TTEView.fSavedTEHandle
TTEView.fSpecsChanged
TTEView.fStyleType
TTEView.fText
TTEView.fTextStyle
TTEView.fTypingCommand
TTEView.GetPrintExtent
TTEView.GivePasteData
TTEView.IdentifySoftware
TTEView.InstallSelection
TTEView.IRes
TTEView.ITEView
TTEView.MakeTERecord
TTEView.RecalcText
TTEView.Resize
TTEView.ScrollSelectionIntoView
TTEView.SetJustification
TTEView.SetOneStyle
TTEView.SetText
TTEView.ShowReverted
TTEView.SpaceForStyles
TTEView.StuffStyles
TTEView.StuffTERects
TTEView.StuffText
TTEView.SynchView
TTEView.ViewEnable
TTEView.WRes
TTEView.WriteRes
TTEView.WriteToDeskScrap
TTextGridView
TTextGridView.DrawCell
TTextGridView.Fields
TTextGridView.fLineAscent
TTextGridView.fLineHeight
TTextGridView.Focus
TTextGridView.fTextStyle
TTextGridView.GetText
TTextGridView.IRes
TTextGridView.ITextGridView
TTextGridView.SetPen
TTextGridView.SetUpFont
TTextGridView.WRes
TTextGridView.WriteRes
TTextListView
TTextListView.AllItemsDo
TTextListView.CanSelectCell
TTextListView.CanSelectItem
TTextListView.DelItemAt
TTextListView.DelItemFirst
TTextListView.DelItemLast
TTextListView.EachItemDo
TTextListView.EachSelectedItemDo
TTextListView.Fields
TTextListView.FirstSelectedItem
TTextListView.GetItemHeight
TTextListView.GetItemText
TTextListView.GetItemWidth
TTextListView.GetText
TTextListView.InsItemBefore
TTextListView.InsItemFirst
TTextListView.InsItemLast
TTextListView.InvalidateItem
TTextListView.IsItemSelected
TTextListView.ITextListView
TTextListView.LastSelectedItem
TTextListView.Resize
TTextListView.SelectCell
TTextListView.SelectItem
TTextListView.SetItemHeight
TTextListView.SetItemWidth
TTextListView.WriteRes
TTranscriptView
TTranscriptView.AddText
TTranscriptView.AddTextToFile
TTranscriptView.CommonInit
TTranscriptView.DoHelp
TTranscriptView.DoIdle
TTranscriptView.DoKeyCommand
TTranscriptView.Draw
TTranscriptView.EndForce
TTranscriptView.fCols
TTranscriptView.fFirstLineIndex
TTranscriptView.fFontHeight
TTranscriptView.fFontInfo
TTranscriptView.fForcePtr
TTranscriptView.fForceStack
TTranscriptView.fGotRefnum
TTranscriptView.fHelpProc
TTranscriptView.Fields
TTranscriptView.fInsertionPointOn
TTranscriptView.fInsertionPt
TTranscriptView.fLastCh
TTranscriptView.fLastInsertionPointTime
TTranscriptView.fLineLengths
TTranscriptView.fLineStarts
TTranscriptView.ForceOutput
TTranscriptView.Free
TTranscriptView.fRefnum
TTranscriptView.fRows
TTranscriptView.fText
TTranscriptView.fTextStyle
TTranscriptView.fTotal
TTranscriptView.fUpdateRgn
TTranscriptView.fVRefNum
TTranscriptView.fWrToFile
TTranscriptView.fWrToWindow
TTranscriptView.GetInsertionPointRect
TTranscriptView.HandleMouseDown
TTranscriptView.IndexColToLocal
TTranscriptView.IndexToLocal
TTranscriptView.IndexToRow
TTranscriptView.InstallTextStyle
TTranscriptView.IRes
TTranscriptView.ITranscriptView
TTranscriptView.LocalToCol
TTranscriptView.LocalToIndex
TTranscriptView.PrevIndex
TTranscriptView.Redirect
TTranscriptView.RevealInsertionPoint
TTranscriptView.RevealInsertionPointLine
TTranscriptView.RowToIndex
TTranscriptView.Scroll
TTranscriptView.SuccIndex
TUndoRedoCommand
TUndoRedoCommand.DoIt
TUndoRedoCommand.Fields
TUndoRedoCommand.IUndoRedoCommand
TView
TView.Activate
TView.AddSubView
TView.AdjustSize
TView.Adorn
TView.AssumeFocused
TView.AttachPrintHandler
TView.BeInPort
TView.BeInScroller
TView.CalcMinSize
TView.ClipFurtherTo
TView.Close
TView.ComputeSize
TView.ContainsClipType
TView.ContainsMouse
TView.CountSubViews
TView.DoBreakFollowing
TView.DoCalcPageStrips
TView.DoCalcViewPerPage
TView.DoCheckPrinter
TView.DoChoice
TView.DoDrawPageBreak
TView.DoDrawPrintFeedback
TView.DoHighlightSelection
TView.DoMenuCommand
TView.DoMouseCommand
TView.DoOffScreen
TView.DoPagination
TView.DoPrinterChanged
TView.DoSetCursor
TView.DoSetPageOffset
TView.DoSetupMenus
TView.Draw
TView.DrawContents
TView.EachSubView
TView.fDocument
TView.fFocusRec
TView.fHLDesired
TView.fIdentifier
TView.Fields
TView.FindSubView
TView.FirstSubviewThat
TView.fLocation
TView.Focus
TView.FocusOnSuperView
TView.ForceRedraw
TView.fPrintHandler
TView.Free
TView.FreeFromClipboard
TView.fShown
TView.fSize
TView.fSizeDeterminer
TView.fSubViews
TView.fSuperView
TView.fViewEnabled
TView.GetDefaultCursorRgn
TView.GetDialogView
TView.GetExtent
TView.GetFrame
TView.GetGrafPort
TView.GetInspectorName
TView.GetPrintExtent
TView.GetQDExtent
TView.GetScroller
TView.GetVisibleRect
TView.GetWindow
TView.GivePasteData
TView.HandleCursor
TView.HandleMouseDown
TView.HasPendingUpdate
TView.InvalidateFocus
TView.InvalidRect
TView.InvalidVRect
TView.IRes
TView.IsDoneTracking
TView.IsFocused
TView.IsShown
TView.IsViewEnabled
TView.IsVisible
TView.IView
TView.LastSubViewThat
TView.LocalToSuper
TView.LocalToWindow
TView.Locate
TView.MakeFirstSubView
TView.MakeLastSubView
TView.Open
TView.PageInteriorChanged
TView.QDToViewPt
TView.QDToViewRect
TView.RemoveSubView
TView.Resize
TView.RevealBottom
TView.RevealRect
TView.RevealTop
TView.Show
TView.ShowReverted
TView.SubViewChangedSize
TView.SubViewMoved
TView.SuperToLocal
TView.SuperViewChangedSize
TView.SuperViewMoved
TView.TrackConstrain
TView.TrackFeedback
TView.TrackMouse
TView.Update
TView.ValidVRect
TView.ViewEnable
TView.ViewToQDPt
TView.ViewToQDRect
TView.WindowToLocal
TView.WRes
TView.WriteRes
TView.WriteToDeskScrap
TWindow
TWindow.Activate
TWindow.AdaptToScreen
TWindow.AllowsMenuAccess
TWindow.BuildWindowRgns
TWindow.Center
TWindow.Close
TWindow.CloseByUser
TWindow.DoMenuCommand
TWindow.DoSetupMenus
TWindow.DrawContents
TWindow.DrawResizeIcon
TWindow.fAdapted
TWindow.fClosesDocument
TWindow.fConstTitle
TWindow.fContDifference
TWindow.fContRgnInset
TWindow.fDisposeOnFree
TWindow.fDoFirstClick
TWindow.fFloats
TWindow.fForcedOnScreen
TWindow.fFreeOnClosing
TWindow.fHorzCentered
TWindow.Fields
TWindow.fIsActive
TWindow.fIsClosable
TWindow.fIsModal
TWindow.fIsResizable
TWindow.fMoveBounds
TWindow.fMustAdapt
TWindow.fMustForceOnScreen
TWindow.fMustHorzCenter
TWindow.fMustStagger
TWindow.fMustVertCenter
TWindow.Focus
TWindow.FocusOnSuperView
TWindow.fOpenInitially
TWindow.ForceOnScreen
TWindow.fPreDocname
TWindow.fProcId
TWindow.Free
TWindow.fResizeLimits
TWindow.fStaggered
TWindow.fTarget
TWindow.fTargetId
TWindow.fVertCentered
TWindow.fWMgrWindow
TWindow.GetGlobalBounds
TWindow.GetGrafPort
TWindow.GetInspectorName
TWindow.GetMaxIntersectedDevice
TWindow.GetTitle
TWindow.GetWindow
TWindow.GoAwayByUser
TWindow.HandleMouseDown
TWindow.HasPendingUpdate
TWindow.InstallDocument
TWindow.IRes
TWindow.IsDraggable
TWindow.IsShown
TWindow.IWindow
TWindow.Locate
TWindow.MoveByUser
TWindow.Open
TWindow.Resize
TWindow.ResizeByUser
TWindow.Select
TWindow.SetResizeLimits
TWindow.SetTarget
TWindow.SetTitle
TWindow.SetTitleForDoc
TWindow.Show
TWindow.SimpleStagger
TWindow.Update
TWindow.WRes
TWindow.WriteRes
TWindow.Zoom
TWindow.ZoomByUser
UnionVRect
UnloadAllSegments
UnpatchAll
UnpatchTrap
UprChar
UprMAName
UprStr255
UseROMMap
UseSelectionColor
UseTempRgn
ValidateConfiguration
ValidateMenuBar
ValidateMenus
VBLInstall
VBLRemove
VerboseIsHandle
VerboseIsObject
VisibleRect
VPtToPt
VRectsNest
VRectToRect
WindCmd
WithApplicationResFileDo
WithCodeResFileDo
WithHideFromMacAppDo
WriteBoolean
WriteChar
WriteFocus
WriteHandleContents
WriteHexInt
WriteHexLongint
WritePt
WritePtr
WriteRect
WriteReserves
WriteSig
WriteVPt
WriteVRect
WrLblBoolean
WrLblField
WrLblHandleContents
WrLblHexInt
WrLblHexLongint
WrLblPt
WrLblPtr
WrLblRect
WrLblSig
WrLblVPt
WrLblVRect
XDebugAddrError
XDebugBusError
XDebugCheck
XDebugIllInst
XDebugLineF
XDebugOverflow
XDebugSysError
XDebugZeroDiv
YouAreWarned